From 0f0ac0bc141b9eede4a6869b876e827ef8f4bfe5 Mon Sep 17 00:00:00 2001 From: andri lim Date: Sat, 1 Jun 2024 19:34:28 +0700 Subject: [PATCH] Only produce debugging metadata when nimbusDumpDebuggingMetaData is defined (#2275) --- nimbus/core/chain/persist_blocks.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nimbus/core/chain/persist_blocks.nim b/nimbus/core/chain/persist_blocks.nim index 2c83b508b..7a2dd2db6 100644 --- a/nimbus/core/chain/persist_blocks.nim +++ b/nimbus/core/chain/persist_blocks.nim @@ -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)