HomePhabricator

refuse to activate a UTXO snapshot if mempool not empty

Description

refuse to activate a UTXO snapshot if mempool not empty

Summary:
This ensures that we avoid any unexpected conditions inherent in
transferring non-empty mempools across chainstates.

Note that this should never happen in practice given that snapshot
activation will not occur outside of IBD, based upon the height checks
in loadtxoutset.

This is a partial backport of core#27596
https://github.com/bitcoin/bitcoin/pull/27596/commits/bb0585779472962f40d9cdd9c6532132850d371c

Depends on D17897

Test Plan:
ninja all check-all on my dev branch and IBD with assumeutxo

The dev branch has the corresponding functional test from core#29394 (will be added after we backport the loadtxoutset RPC)

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17898

Details

Provenance
James O'Beirne <james.obeirne@pm.me>Authored on Sep 8 2023, 10:29
PiRKCommitted on Mon, Apr 7, 13:56
PiRKPushed on Mon, Apr 7, 13:56
Reviewer
Restricted Project
Differential Revision
D17898: refuse to activate a UTXO snapshot if mempool not empty
Parents
rABC0631de341095: validation: assumeutxo: swap m_mempool on snapshot activation
Branches
Unknown
Tags
Unknown