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 <git@bluematt.me>
if (DeploymentActiveAfter(pindexPrev, chainman, Consensus::DEPLOYMENT_64BYTETX)) {
4263
+
for (constauto& tx : block.vtx) {
4264
+
if (::GetSerializeSize(TX_NO_WITNESS(tx)) == 64) {
4265
+
return state.Invalid(BlockValidationResult::BLOCK_MUTATED, "64-byte-transaction", strprintf("size of tx %s without witness is 64 bytes", tx->GetHash().ToString()));
4266
+
}
4267
+
}
4268
+
}
4269
+
4270
+
returntrue;
4271
+
}
4272
+
4244
4273
/** NOTE: This function is not currently invoked by ConnectBlock(), so we
4245
4274
* should consider upgrade issues if we change which consensus rules are
4246
4275
* enforced in this function (eg by adding a new consensus rule). See comment
0 commit comments