diff options
| author | Pieter Wuille <[email protected]> | 2013-10-10 23:07:44 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2013-10-11 23:25:50 +0200 |
| commit | 4c6d41b8b653ef90639b1a32f6aab0bb1cef90c5 (patch) | |
| tree | 3e29135e08fa64984cd47fdfeda42d55e7e51ad8 /src/qt/transactionrecord.cpp | |
| parent | Merge pull request #3081 from Diapolo/silence_compiler (diff) | |
| download | discoin-4c6d41b8b653ef90639b1a32f6aab0bb1cef90c5.tar.xz discoin-4c6d41b8b653ef90639b1a32f6aab0bb1cef90c5.zip | |
Refactor/encapsulate chain globals into a CChain class
Diffstat (limited to 'src/qt/transactionrecord.cpp')
| -rw-r--r-- | src/qt/transactionrecord.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index ea2c1f0a5..162908a9a 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -160,14 +160,14 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) idx); status.confirmed = wtx.IsConfirmed(); status.depth = wtx.GetDepthInMainChain(); - status.cur_num_blocks = nBestHeight; + status.cur_num_blocks = chainActive.Height(); if (!IsFinalTx(wtx)) { if (wtx.nLockTime < LOCKTIME_THRESHOLD) { status.status = TransactionStatus::OpenUntilBlock; - status.open_for = wtx.nLockTime - nBestHeight + 1; + status.open_for = wtx.nLockTime - chainActive.Height() + 1; } else { @@ -221,7 +221,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) bool TransactionRecord::statusUpdateNeeded() { - return status.cur_num_blocks != nBestHeight; + return status.cur_num_blocks != chainActive.Height(); } QString TransactionRecord::getTxID() const |