Skip to content

Commit

Permalink
Only produce debugging metadata when nimbusDumpDebuggingMetaData is d…
Browse files Browse the repository at this point in the history
…efined (#2275)
  • Loading branch information
jangko committed Jun 1, 2024
1 parent cfbbcda commit 0f0ac0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nimbus/core/chain/persist_blocks.nim
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ proc persistBlocksImpl(c: ChainRef; headers: openArray[BlockHeader];
vmState.processBlock(header, body)
else:
ValidationResult.OK
when not defined(release):

when defined(nimbusDumpDebuggingMetaData):
if validationResult == ValidationResult.Error and
body.transactions.calcTxRoot == header.txRoot:
vmState.dumpDebuggingMetaData(header, body)
Expand Down

0 comments on commit 0f0ac0b

Please sign in to comment.