HomePhabricator

test: move CreateAndActivateUTXOSnapshot into test/util/chainstate.h

Description

test: move CreateAndActivateUTXOSnapshot into test/util/chainstate.h

Summary:

move-only: unittest: add test/util/chainstate.h

and move CreateAndActivateUTXOSnapshot() into it for reuse
in future test modules.

test: refactor: declare NoMalleation const auto

To avoid linker error on some platforms:

https://github.com/bitcoin/bitcoin/pull/21526#discussion_r709404714

Co-authored-by: Russ Yanofsky <russ@yanofsky.org>

This is a backport of core#21526 [9 & 10/12]
https://github.com/bitcoin/bitcoin/pull/21526/commits/071200993f3a9412821ce5387851d659baf85327
https://github.com/bitcoin/bitcoin/pull/21526/commits/298bf5d563cc740c6ae71750d86942e0278b22d6

Backported out of order (refactoring commits first)

Test Plan: ninja check

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
James O'Beirne <james.obeirne@pm.me>Authored on Apr 7 2021, 15:48
PiRKCommitted on Oct 17 2022, 14:51
PiRKPushed on Oct 17 2022, 14:51
Reviewer
Restricted Project
Differential Revision
D12268: test: move CreateAndActivateUTXOSnapshot into test/util/chainstate.h
Parents
rABCbd99c7d928bc: refactor: remove unused assumeutxo methods
Branches
Unknown
Tags
Unknown