Page MenuHomePhabricator

[validation/refactor] store precomputed txdata in workspace
ClosedPublic

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

Details

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

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:49
Fabien requested changes to this revision.Oct 21 2022, 07:58
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/validation.cpp
405 ↗(On Diff #35905)

Nope

731 ↗(On Diff #35905)

Nit: as per source material

This revision now requires changes to proceed.Oct 21 2022, 07:58
PiRK edited the summary of this revision. (Show Details)

skip D12341 & nit

This revision is now accepted and ready to land.Oct 21 2022, 10:12