You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 64-byte transaction check is executed in a new ContextualBlockPreCheck
which must be run before CheckBlock (at least in the final checking
before writing the block to disk). This function is a bit awkward but
is seemingly the simplest way to implement the new check, with the caveat
that, because the new function is called before CheckBlock, it can never
return a non-CorruptionPossible error state.
Co-Authored-By: Matt Corallo <[email protected]>
if (DeploymentActiveAfter(pindexPrev, chainman, Consensus::DEPLOYMENT_64BYTETX)) {
3448
+
for (constauto& tx : block.vtx) {
3449
+
if (::GetSerializeSize(tx, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) == 64) {
3450
+
return state.Invalid(BlockValidationResult::BLOCK_MUTATED, "64-byte-transaction", strprintf("size of tx %s without witness is 64 bytes", tx->GetHash().ToString()));
3451
+
}
3452
+
}
3453
+
}
3454
+
3455
+
returntrue;
3456
+
}
3457
+
3431
3458
/** NOTE: This function is not currently invoked by ConnectBlock(), so we
3432
3459
* should consider upgrade issues if we change which consensus rules are
3433
3460
* enforced in this function (eg by adding a new consensus rule). See comment
0 commit comments