diff options
| author | Gavin Andresen <[email protected]> | 2013-10-14 20:39:00 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-10-14 20:39:00 -0700 |
| commit | b9beea6e9d0f789f11d249b040e549d535bdc295 (patch) | |
| tree | e87c3422b52b1f6d78b88b9cea756c1f3cb8d37b /src/rpcrawtransaction.cpp | |
| parent | Merge pull request #2933 from sipa/leveldb113 (diff) | |
| parent | Refactor/encapsulate chain globals into a CChain class (diff) | |
| download | discoin-b9beea6e9d0f789f11d249b040e549d535bdc295.tar.xz discoin-b9beea6e9d0f789f11d249b040e549d535bdc295.zip | |
Merge pull request #3077 from sipa/chain
Refactor/encapsulate chain globals into a CChain class
Diffstat (limited to 'src/rpcrawtransaction.cpp')
| -rw-r--r-- | src/rpcrawtransaction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index fcc5359dd..5384b6590 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -87,9 +87,9 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry) if (mi != mapBlockIndex.end() && (*mi).second) { CBlockIndex* pindex = (*mi).second; - if (pindex->IsInMainChain()) + if (chainActive.Contains(pindex)) { - entry.push_back(Pair("confirmations", 1 + nBestHeight - pindex->nHeight)); + entry.push_back(Pair("confirmations", 1 + chainActive.Height() - pindex->nHeight)); entry.push_back(Pair("time", (boost::int64_t)pindex->nTime)); entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime)); } |