Skip to content

Commit fbe0a7d

Browse files
committed
wallet: validationinterface: only handle active chain notifications
1 parent f073917 commit fbe0a7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/wallet/wallet.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ void CWallet::chainStateFlushed(ChainstateRole role, const CBlockLocator& loc)
631631
{
632632
// Don't update the best block until the chain is attached so that in case of a shutdown,
633633
// the rescan will be restarted at next startup.
634-
if (m_attaching_chain) {
634+
if (m_attaching_chain || role == ChainstateRole::BACKGROUND) {
635635
return;
636636
}
637637
WalletBatch batch(GetDatabase());
@@ -1465,6 +1465,9 @@ void CWallet::transactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRe
14651465

14661466
void CWallet::blockConnected(ChainstateRole role, const interfaces::BlockInfo& block)
14671467
{
1468+
if (role == ChainstateRole::BACKGROUND) {
1469+
return;
1470+
}
14681471
assert(block.data);
14691472
LOCK(cs_wallet);
14701473

0 commit comments

Comments
 (0)