diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2020-01-23 19:31:16 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2020-05-23 20:02:04 -0300 |
commit | 2f867203b0c7a4438ce484be4cfa2b29dbf1abf0 (patch) | |
tree | e8db2784b603a7c802625cef6db7d18b0a4236ad /src/qt/transactionrecord.h | |
parent | cfe22a5f9e1d9e2d3dc8ce177e6c8eb04bc96615 (diff) |
Added best block hash to the NotifyHeaderTip and NotifyBlockTip signals.
[ClientModel] best header/block hash cached.
Diffstat (limited to 'src/qt/transactionrecord.h')
-rw-r--r-- | src/qt/transactionrecord.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h index 3f64cefd09..c983c527c0 100644 --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -23,9 +23,8 @@ struct WalletTxStatus; class TransactionStatus { public: - TransactionStatus(): - countsForBalance(false), sortKey(""), - matures_in(0), status(Unconfirmed), depth(0), open_for(0), cur_num_blocks(-1) + TransactionStatus() : countsForBalance(false), sortKey(""), + matures_in(0), status(Unconfirmed), depth(0), open_for(0) { } enum Status { @@ -61,8 +60,8 @@ public: finalization */ /**@}*/ - /** Current number of blocks (to know whether cached status is still valid) */ - int cur_num_blocks; + /** Current block hash (to know whether cached status is still valid) */ + uint256 m_cur_block_hash{}; bool needsUpdate; }; @@ -138,11 +137,11 @@ public: /** Update status from core wallet tx. */ - void updateStatus(const interfaces::WalletTxStatus& wtx, int numBlocks, int64_t block_time); + void updateStatus(const interfaces::WalletTxStatus& wtx, const uint256& block_hash, int numBlocks, int64_t block_time); /** Return whether a status update is needed. */ - bool statusUpdateNeeded(int numBlocks) const; + bool statusUpdateNeeded(const uint256& block_hash) const; }; #endif // BITCOIN_QT_TRANSACTIONRECORD_H |