HomePhabricator

[validation/refactor] store precomputed txdata in workspace

Description

[validation/refactor] store precomputed txdata in workspace

Summary:

We want to be able to re-use the precomputed transaction data between
PolicyScriptChecks and ConsensusScriptChecks in
AcceptMultipleTransactions.

For Bitcoin ABC, the PolicyScriptChecks code is part of PreChecks.

D8203 duplicated the initialization of the PrecomputedTransactionData. This patch changes it to be computed only once, and only if the cheap pre-checks are successful.

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

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
glozow <gloriajzhao@gmail.com>Authored on Jul 20 2021, 10:38
PiRKCommitted on Oct 21 2022, 12:11
PiRKPushed on Oct 21 2022, 12:11
Reviewer
Restricted Project
Differential Revision
D12347: [validation/refactor] store precomputed txdata in workspace
Parents
rABC979f4e87a480: [validation] case-based constructors for ATMPArgs
Branches
Unknown
Tags
Unknown