mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 14:37:42 -03:00
wallet: validationinterface: only handle active chain notifications
This commit is contained in:
parent
f073917a9e
commit
fbe0a7d7ca
1 changed files with 4 additions and 1 deletions
|
@ -631,7 +631,7 @@ void CWallet::chainStateFlushed(ChainstateRole role, const CBlockLocator& loc)
|
||||||
{
|
{
|
||||||
// Don't update the best block until the chain is attached so that in case of a shutdown,
|
// Don't update the best block until the chain is attached so that in case of a shutdown,
|
||||||
// the rescan will be restarted at next startup.
|
// the rescan will be restarted at next startup.
|
||||||
if (m_attaching_chain) {
|
if (m_attaching_chain || role == ChainstateRole::BACKGROUND) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WalletBatch batch(GetDatabase());
|
WalletBatch batch(GetDatabase());
|
||||||
|
@ -1465,6 +1465,9 @@ void CWallet::transactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRe
|
||||||
|
|
||||||
void CWallet::blockConnected(ChainstateRole role, const interfaces::BlockInfo& block)
|
void CWallet::blockConnected(ChainstateRole role, const interfaces::BlockInfo& block)
|
||||||
{
|
{
|
||||||
|
if (role == ChainstateRole::BACKGROUND) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
assert(block.data);
|
assert(block.data);
|
||||||
LOCK(cs_wallet);
|
LOCK(cs_wallet);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue