aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2024-02-24 09:58:30 -0500
committerluigi1111 <luigi1111w@gmail.com>2024-02-24 09:58:30 -0500
commit81f113dd8c4f88bf963b5444df0ed5b9942d6bc6 (patch)
tree30ad0f6750c7e3c8fce67e84cea12ccb836e5000 /src/wallet/wallet2.cpp
parentf9a7f2a13612253dfc9db04ac015c97c54c07c2d (diff)
parent9a89e2d9e4704f3c18f9b299342fc8a403a85de8 (diff)
downloadmonzero-core-81f113dd8c4f88bf963b5444df0ed5b9942d6bc6.tar.gz
monzero-core-81f113dd8c4f88bf963b5444df0ed5b9942d6bc6.tar.xz
monzero-core-81f113dd8c4f88bf963b5444df0ed5b9942d6bc6.zip
Merge pull request #9008
9a89e2d wallet2: call on_reorg callback in handle_reorg (j-berman) 1df5630 wallet2: add on_reorg callback (Crypto City)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 96a6c6d71..34489699b 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -4324,7 +4324,10 @@ void wallet2::handle_reorg(uint64_t height, std::map<std::pair<uint64_t, uint64_
// C
THROW_WALLET_EXCEPTION_IF(height < m_blockchain.offset() && m_blockchain.size() > m_blockchain.offset(),
error::wallet_internal_error, "Daemon claims reorg below last checkpoint");
- detach_blockchain(height, output_tracker_cache);
+ detached_blockchain_data dbd = detach_blockchain(height, output_tracker_cache);
+
+ if (m_callback)
+ m_callback->on_reorg(height, dbd.detached_blockchain.size(), dbd.detached_tx_hashes.size());
}
//----------------------------------------------------------------------------------------------------
bool wallet2::deinit()