diff options
| author | Wladimir J. van der Laan <[email protected]> | 2019-01-15 17:25:14 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2019-01-15 17:39:19 +0100 |
| commit | e8ad580f51532f6bfa6cb55688bffcc12196c0ac (patch) | |
| tree | caeaa785212bc70ad92d5d827927d4ce85dfc31e /src/qt/transactiontablemodel.cpp | |
| parent | Merge #14594: qt: Fix minimized window bug on Linux (diff) | |
| parent | Don't label transactions "Open" while catching up (diff) | |
| download | discoin-e8ad580f51532f6bfa6cb55688bffcc12196c0ac.tar.xz discoin-e8ad580f51532f6bfa6cb55688bffcc12196c0ac.zip | |
Merge #14556: qt: fix confirmed transaction labeled "open" (#13299)
fb3ce75807c50055a97f573fc72bf44d997ea218 Don't label transactions "Open" while catching up (Hennadii Stepanov)
Pull request description:
Fix #13299.
Since the default `nSequence` is `0xFFFFFFFE` and locktime is enabled, the checking `wtx.is_final` is meaningless until the syncing has completed (ref: #1026).
This PR makes the wallet mark a transaction "Unconfirmed" instead of misleading "Open for NNN more blocks" when syncing after a period of being offline.
Before this PR (with the issue):

With this PR (the issue has been resolved):

Tree-SHA512: 358ec83b43c266a4d32a37a79dda80e80d40a2b77ad38261c84a095e613399f674aa7184805b3f6310e51ddb83ae2636b8849fcc7c4333e1b3ecbb0f70ad86d3
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
| -rw-r--r-- | src/qt/transactiontablemodel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 6e4d572a9..631a9b891 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -192,8 +192,9 @@ public: // simply re-use the cached status. interfaces::WalletTxStatus wtx; int numBlocks; - if (wallet.tryGetTxStatus(rec->hash, wtx, numBlocks) && rec->statusUpdateNeeded(numBlocks)) { - rec->updateStatus(wtx, numBlocks); + int64_t block_time; + if (wallet.tryGetTxStatus(rec->hash, wtx, numBlocks, block_time) && rec->statusUpdateNeeded(numBlocks)) { + rec->updateStatus(wtx, numBlocks, block_time); } return rec; } |