Only produce debugging metadata when nimbusDumpDebuggingMetaData is defined (#2275)

This commit is contained in:
andri lim 2024-06-01 19:34:28 +07:00 committed by GitHub
parent cfbbcda4f7
commit 0f0ac0bc14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -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)