File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2961,6 +2961,7 @@ bool CWallet::AttachChain(const std::shared_ptr<CWallet>& walletInstance, interf
2961
2961
// so that in case of a shutdown event, the rescan will be repeated at the next start.
2962
2962
// This is temporary until rescan and notifications delivery are unified under same
2963
2963
// interface.
2964
+ walletInstance->m_attaching_chain = true ; // ignores chainStateFlushed notifications
2964
2965
walletInstance->m_chain_notifications_handler = walletInstance->chain ().handleNotifications (walletInstance);
2965
2966
2966
2967
// If rescan_required = true, rescan_height remains equal to 0
@@ -2987,7 +2988,6 @@ bool CWallet::AttachChain(const std::shared_ptr<CWallet>& walletInstance, interf
2987
2988
2988
2989
if (tip_height && *tip_height != rescan_height)
2989
2990
{
2990
- walletInstance->m_attaching_chain = true ; // ignores chainStateFlushed notifications
2991
2991
if (chain.havePruned ()) {
2992
2992
int block_height = *tip_height;
2993
2993
while (block_height > 0 && chain.haveBlockOnDisk (block_height - 1 ) && rescan_height != block_height) {
@@ -3031,6 +3031,7 @@ bool CWallet::AttachChain(const std::shared_ptr<CWallet>& walletInstance, interf
3031
3031
walletInstance->chainStateFlushed (chain.getTipLocator ());
3032
3032
walletInstance->GetDatabase ().IncrementUpdateCounter ();
3033
3033
}
3034
+ walletInstance->m_attaching_chain = false ;
3034
3035
3035
3036
return true ;
3036
3037
}
You can’t perform that action at this time.
0 commit comments