Page MenuHomePhabricator

[validation] case-based constructors for ATMPArgs
ClosedPublic

Authored by PiRK on Oct 21 2022, 07:46.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC979f4e87a480: [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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Oct 21 2022, 07:46
Fabien requested changes to this revision.Oct 21 2022, 07:54
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.cpp
354 ↗(On Diff #35904)

Layout

This revision now requires changes to proceed.Oct 21 2022, 07:54
This revision is now accepted and ready to land.Oct 21 2022, 10:10