HomePhabricator

test/fuzz: Invoke LoadMempool via Chainstate

Description

test/fuzz: Invoke LoadMempool via Chainstate

Summary:
Not only does this increase coverage, it is also more correct in that
when ::LoadMempool is called with a mempool and chainstate, it calls
AcceptToMemoryPool with just the chainstate.

AcceptToMemoryPool will then act on the chainstate's mempool via
CChainState::GetMempool, which may be different from the mempool
originally passed to ::LoadMempool. (In this fuzz test's case, it
definitely is different)

This is a partial backport of core#25478
https://github.com/bitcoin/bitcoin/pull/25487/commits/b857ac60d9a0433036519c26675378bbf56a1de1

Depends on D15720

Test Plan: ninja all check-all bitcoin-fuzzers

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Carl Dong <contact@carldong.me>Authored on May 17 2022, 18:45
PiRKCommitted on Mar 18 2024, 15:16
PiRKPushed on Mar 18 2024, 15:16
Reviewer
Restricted Project
Differential Revision
D15721: test/fuzz: Invoke LoadMempool via Chainstate
Parents
rABC181f33bef0fd: Move FopenFn to fsbridge namespace
Branches
Unknown
Tags
Unknown