Skip to content

Commit 48e9eac

Browse files
authored
feat(block-validator): add debug logging message for MaxRlpBlockSize (#9236)
Signed-off-by: Antoine James <[email protected]>
1 parent 2f018d3 commit 48e9eac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Nethermind/Nethermind.Consensus/Validators/BlockValidator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public bool ValidateSuggestedBlock(Block block, BlockHeader? parent, out string?
7474
int encodedSize = block.EncodedSize ?? _blockDecoder.GetLength(block, RlpBehaviors.None);
7575
if (spec.IsEip7934Enabled && encodedSize > spec.Eip7934MaxRlpBlockSize)
7676
{
77+
if (_logger.IsDebug) _logger.Debug($"{Invalid(block)} RLP encoded size of {encodedSize} bytes exceeds the max limit of {spec.Eip7934MaxRlpBlockSize} bytes");
7778
errorMessage = BlockErrorMessages.ExceededBlockSizeLimit(spec.Eip7934MaxRlpBlockSize);
7879
return false;
7980
}

0 commit comments

Comments
 (0)