Skip to content

Commit 60bf96d

Browse files
committed
perf: exclude parsing CCbTx if flag fCheckCbTxMerkleRoots is not set
1 parent b911929 commit 60bf96d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/evo/specialtxman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ bool CSpecialTxProcessor::ProcessSpecialTxsInBlock(const CBlock& block, const CB
149149
int64_t nTime0 = GetTimeMicros();
150150

151151
std::optional<CCbTx> opt_cbTx{std::nullopt};
152-
if (block.vtx.size() > 0 && block.vtx[0]->nType == TRANSACTION_COINBASE) {
152+
if (fCheckCbTxMerkleRoots && block.vtx.size() > 0 && block.vtx[0]->nType == TRANSACTION_COINBASE) {
153153
const auto& tx = block.vtx[0];
154154
if (!tx->IsCoinBase()) {
155155
return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, "bad-cbtx-invalid");

0 commit comments

Comments
 (0)