From e4513bf9250799bc18a10728af184d6c86a561a4 Mon Sep 17 00:00:00 2001 From: ChrisCho-H Date: Tue, 11 Mar 2025 10:04:13 +0900 Subject: [PATCH] feat: add MAX_BLOCK_SERIALIZED_SIZE existing in core --- bitcoin/src/blockdata/constants.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bitcoin/src/blockdata/constants.rs b/bitcoin/src/blockdata/constants.rs index 2c5cb4e19..ae0d48df8 100644 --- a/bitcoin/src/blockdata/constants.rs +++ b/bitcoin/src/blockdata/constants.rs @@ -52,6 +52,8 @@ pub const SUBSIDY_HALVING_INTERVAL: u32 = 210_000; pub const MAX_SCRIPTNUM_VALUE: u32 = 0x80000000; // 2^31 /// Number of blocks needed for an output from a coinbase transaction to be spendable. pub const COINBASE_MATURITY: u32 = 100; +/// The maximum allowed size for a serialized block, in bytes (only for buffer size limits) +pub const MAX_BLOCK_SERIALIZED_SIZE: usize = 4_000_000; // This is the 65 byte (uncompressed) pubkey used as the one-and-only output of the genesis transaction. //