Cached transaction data reused across signature‐hash computations for a single transaction.

Synopsis

Declared in <script/interpreter.h>

struct PrecomputedTransactionData;

Member Functions

Name

Description

PrecomputedTransactionData [constructor]

Constructors

Init

Initialize this PrecomputedTransactionData with transaction data.

Data Members

Name

Description

hashOutputs

BIP143 double‐SHA256 hash of all outputs.

hashPrevouts

BIP143 double‐SHA256 hash of all input prevouts.

hashSequence

BIP143 double‐SHA256 hash of all input sequences.

m_bip143_segwit_ready

Whether the 3 fields above are initialized.

m_bip341_taproot_ready

Whether the 5 fields above are initialized.

m_outputs_single_hash

BIP341 single‐SHA256 hash of all outputs.

m_prevouts_single_hash

BIP341 single‐SHA256 hash of all input prevouts.

m_sequences_single_hash

BIP341 single‐SHA256 hash of all input sequences.

m_spent_amounts_single_hash

BIP341 single‐SHA256 hash of all spent output amounts.

m_spent_outputs

The outputs being spent by this transaction, one per input.

m_spent_outputs_ready

Whether m_spent_outputs is initialized.

m_spent_scripts_single_hash

BIP341 single‐SHA256 hash of all spent output scriptPubKeys.

Non-Member Functions

Name

Description

PrecomputePSBTData

Compute a PrecomputedTransactionData object from a psbt.

Created with MrDocs