diff options
author | Antoine Riard <ariard@student.42.fr> | 2019-07-24 15:41:41 -0400 |
---|---|---|
committer | Antoine Riard <ariard@student.42.fr> | 2019-11-05 12:59:16 -0500 |
commit | 10b4729e33f76092bd8cfa06d1a5e0a066436f76 (patch) | |
tree | 7ef80f8890067aa49125583624db014a0d6ec1e2 /src/wallet/wallet.cpp | |
parent | 50591f6ec61b802cf4193cdbefcc85ad75716e8d (diff) | |
download | bitcoin-10b4729e33f76092bd8cfa06d1a5e0a066436f76.tar.xz |
Pass block height in Chain::BlockConnected/Chain::BlockDisconnected
To do so we update CValidationInterface::BlockDisconnect to take a
CBlockIndex pointing to the block being disconnected.
This new parameter will be use in the following commit to establish
wallet height.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0b7dc256ad..365a296e6f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1052,7 +1052,8 @@ void CWallet::TransactionRemovedFromMempool(const CTransactionRef &ptx) { } } -void CWallet::BlockConnected(const CBlock& block, const std::vector<CTransactionRef>& vtxConflicted) { +void CWallet::BlockConnected(const CBlock& block, const std::vector<CTransactionRef>& vtxConflicted, int height) +{ const uint256& block_hash = block.GetHash(); auto locked_chain = chain().lock(); LOCK(cs_wallet); @@ -1068,7 +1069,8 @@ void CWallet::BlockConnected(const CBlock& block, const std::vector<CTransaction m_last_block_processed = block_hash; } -void CWallet::BlockDisconnected(const CBlock& block) { +void CWallet::BlockDisconnected(const CBlock& block, int height) +{ auto locked_chain = chain().lock(); LOCK(cs_wallet); |