Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ default = ["json-contract"]

json-contract = ["serde_json"]
"serde" = [
"bitcoin/serde",
"bitcoin/serde",
"secp256k1-zkp/serde",
"actual-serde",
Expand Down
12 changes: 0 additions & 12 deletions src/blind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ pub enum TxOutError {
UnExpectedNullValue,
/// Unexpected Null asset
UnExpectedNullAsset,
/// Money should be between 0 and `21_000_000`
MoneyOutofRange,
/// Zero value explicit txout with non-provably unspendable script
NonUnspendableZeroValue,
/// Zero value pedersen commitment with provably unspendable script
Expand All @@ -56,11 +54,6 @@ impl fmt::Display for TxOutError {
match self {
TxOutError::UnExpectedNullValue => write!(f, "UnExpected Null Value"),
TxOutError::UnExpectedNullAsset => write!(f, "UnExpected Null Asset"),
TxOutError::MoneyOutofRange => write!(
f,
"Explicit amount must be\
less than 21 million"
),
TxOutError::NonUnspendableZeroValue => {
write!(
f,
Expand Down Expand Up @@ -467,8 +460,6 @@ impl TxOut {
pub const RANGEPROOF_EXP_SHIFT: i32 = 0;
/// Rangeproof Minimum private bits
pub const RANGEPROOF_MIN_PRIV_BITS: u8 = 52;
/// Maximum explicit amount in a bitcoin `TxOut`
pub const MAX_MONEY: u64 = 21_000_000 * 100_000_000;

/// Creates a new confidential output that is **not** the last one in the transaction.
/// Provide input secret information by creating [`SurjectionInput`] for each input.
Expand Down Expand Up @@ -631,9 +622,6 @@ impl TxOut {
match self.value {
Value::Null => Err(TxOutError::UnExpectedNullValue),
Value::Explicit(value) => {
if value > Self::MAX_MONEY {
return Err(TxOutError::MoneyOutofRange);
}
if value == 0 {
// zero values are only allowed if they are provably
// unspendable.
Expand Down