mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Merge 98f4db3305 into merged_master (Bitcoin PR bitcoin/bitcoin#25088)
This commit is contained in:
commit
ac98bf499c
1 changed files with 2 additions and 1 deletions
|
|
@ -3199,6 +3199,7 @@ bool CWallet::AttachChain(const std::shared_ptr<CWallet>& walletInstance, interf
|
|||
// so that in case of a shutdown event, the rescan will be repeated at the next start.
|
||||
// This is temporary until rescan and notifications delivery are unified under same
|
||||
// interface.
|
||||
walletInstance->m_attaching_chain = true; //ignores chainStateFlushed notifications
|
||||
walletInstance->m_chain_notifications_handler = walletInstance->chain().handleNotifications(walletInstance);
|
||||
|
||||
// If rescan_required = true, rescan_height remains equal to 0
|
||||
|
|
@ -3225,7 +3226,6 @@ bool CWallet::AttachChain(const std::shared_ptr<CWallet>& walletInstance, interf
|
|||
|
||||
if (tip_height && *tip_height != rescan_height)
|
||||
{
|
||||
walletInstance->m_attaching_chain = true; //ignores chainStateFlushed notifications
|
||||
if (chain.havePruned()) {
|
||||
int block_height = *tip_height;
|
||||
while (block_height > 0 && chain.haveBlockOnDisk(block_height - 1) && rescan_height != block_height) {
|
||||
|
|
@ -3269,6 +3269,7 @@ bool CWallet::AttachChain(const std::shared_ptr<CWallet>& walletInstance, interf
|
|||
walletInstance->chainStateFlushed(chain.getTipLocator());
|
||||
walletInstance->GetDatabase().IncrementUpdateCounter();
|
||||
}
|
||||
walletInstance->m_attaching_chain = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue