@@ -39,8 +39,6 @@ pub enum TxOutError {
3939 UnExpectedNullValue ,
4040 /// Unexpected Null asset
4141 UnExpectedNullAsset ,
42- /// Money should be between 0 and `21_000_000`
43- MoneyOutofRange ,
4442 /// Zero value explicit txout with non-provably unspendable script
4543 NonUnspendableZeroValue ,
4644 /// Zero value pedersen commitment with provably unspendable script
@@ -56,11 +54,6 @@ impl fmt::Display for TxOutError {
5654 match self {
5755 TxOutError :: UnExpectedNullValue => write ! ( f, "UnExpected Null Value" ) ,
5856 TxOutError :: UnExpectedNullAsset => write ! ( f, "UnExpected Null Asset" ) ,
59- TxOutError :: MoneyOutofRange => write ! (
60- f,
61- "Explicit amount must be\
62- less than 21 million"
63- ) ,
6457 TxOutError :: NonUnspendableZeroValue => {
6558 write ! (
6659 f,
@@ -467,8 +460,6 @@ impl TxOut {
467460 pub const RANGEPROOF_EXP_SHIFT : i32 = 0 ;
468461 /// Rangeproof Minimum private bits
469462 pub const RANGEPROOF_MIN_PRIV_BITS : u8 = 52 ;
470- /// Maximum explicit amount in a bitcoin `TxOut`
471- pub const MAX_MONEY : u64 = 21_000_000 * 100_000_000 ;
472463
473464 /// Creates a new confidential output that is **not** the last one in the transaction.
474465 /// Provide input secret information by creating [`SurjectionInput`] for each input.
@@ -631,9 +622,6 @@ impl TxOut {
631622 match self . value {
632623 Value :: Null => Err ( TxOutError :: UnExpectedNullValue ) ,
633624 Value :: Explicit ( value) => {
634- if value > Self :: MAX_MONEY {
635- return Err ( TxOutError :: MoneyOutofRange ) ;
636- }
637625 if value == 0 {
638626 // zero values are only allowed if they are provably
639627 // unspendable.
0 commit comments