HomePhabricator

[validation] case-based constructors for ATMPArgs

Description

[validation] case-based constructors for ATMPArgs

Summary:

No change in behavior.
ATMPArgs can continue to have granular rules like switching BIP125
on/off while we create an interface for the different sets of rules for
single transactions vs multiple-testmempoolaccept vs package validation.
This is a cleaner interface than manually constructing the args, which
makes it easy to mix up ordering, use the wrong default, etc. It also
means we don't need to edit ATMP/single transaction validation code
every time we update ATMPArgs for package validation.

This is a partial backport of core#23381
https://github.com/bitcoin/bitcoin/pull/23381/commits/0a79eaba729e60a83b0e604e6a18e9ba1ca1bc88

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
glozow <gloriajzhao@gmail.com>Authored on Jul 20 2021, 09:41
PiRKCommitted on Oct 21 2022, 12:11
PiRKPushed on Oct 21 2022, 12:11
Reviewer
Restricted Project
Differential Revision
D12346: [validation] case-based constructors for ATMPArgs
Parents
rABCaf4f12ab068c: net: open p2p connections to nodes that listen on non-default ports
Branches
Unknown
Tags
Unknown