From 4db793c3a8ed7098180a0844f1f61774557a6a15 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 19 Oct 2023 21:14:19 +0800 Subject: [PATCH] fix: extra data can equal to MAX_EXTRA_DATA_BYTES (#43) --- lib/src/preparation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/preparation.rs b/lib/src/preparation.rs index 6435d7c8..bcf08c73 100644 --- a/lib/src/preparation.rs +++ b/lib/src/preparation.rs @@ -72,7 +72,7 @@ impl HeaderPrepStrategy for EthHeaderPrepStrategy { } // Validate extra data let extra_data_bytes = block_builder.input.extra_data.len(); - if extra_data_bytes >= MAX_EXTRA_DATA_BYTES { + if extra_data_bytes > MAX_EXTRA_DATA_BYTES { bail!( "Invalid extra data: expected <= {}, got {}", MAX_EXTRA_DATA_BYTES,