This is a single commit taken from the Schnorr/Taproot PR #17977.
Add a default constructor to PrecomputedTransactionData
, which doesn’t initialize the struct’s members. Instead they’re initialized inside the CheckInputScripts()
function. This allows a later commit to add the spent UTXOs to that structure. The spent UTXOs are required for the schnorr signature hash, since it commits to the scriptPubKeys. See https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#common-signature-message for details.
By itself, this isn’t really an improvement to the code, but I think it makes sense to separate out the refactor/moveonly commits from PR #17977 so that PR is only the logical changes needed for Schnorr/Taproot.