From 7d1645aea0b3debf793ac295a1d35340e98f01e1 Mon Sep 17 00:00:00 2001 From: benthecarman Date: Tue, 28 Feb 2023 05:37:10 -0600 Subject: [PATCH] Add constant for coinbase maturity --- 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 3ae56bb5..b3f9743f 100644 --- a/bitcoin/src/blockdata/constants.rs +++ b/bitcoin/src/blockdata/constants.rs @@ -54,6 +54,8 @@ pub const MAX_SCRIPT_ELEMENT_SIZE: usize = 520; pub const SUBSIDY_HALVING_INTERVAL: u32 = 210_000; /// Maximum allowed value for an integer in Script. 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 value allowed in an output (useful for sanity checking, /// since keeping everything below this value should prevent overflows