Policy: Relax MIN_STANDARD_TX_NONWITNESS_SIZE to 65
Align with Bitcoin Core's policy by reducing the minimum non-witness transaction size from 82 to 65 bytes. This change allows for more minimal transaction cases (e.g., 1 input with 1 OP_RETURN output), while still maintaining protection against CVE-2017-12842. Matches bitcoin/bitcoin#26398
This commit is contained in:
parent
81deddd0a9
commit
2fe3687899
|
@ -18,8 +18,8 @@ use super::constants::{MAX_BLOCK_SIGOPS_COST, WITNESS_SCALE_FACTOR};
|
||||||
/// Maximum weight of a transaction for it to be relayed by most nodes on the network
|
/// Maximum weight of a transaction for it to be relayed by most nodes on the network
|
||||||
pub const MAX_STANDARD_TX_WEIGHT: u32 = 400_000;
|
pub const MAX_STANDARD_TX_WEIGHT: u32 = 400_000;
|
||||||
|
|
||||||
/// Minimum non-witness size for a standard transaction (1 SegWit input + 1 P2WPKH output = 82 bytes)
|
/// Minimum non-witness size for a standard transaction, set to 65 bytes.
|
||||||
pub const MIN_STANDARD_TX_NONWITNESS_SIZE: u32 = 82;
|
pub const MIN_STANDARD_TX_NONWITNESS_SIZE: u32 = 65;
|
||||||
|
|
||||||
/// Maximum number of sigops in a standard tx.
|
/// Maximum number of sigops in a standard tx.
|
||||||
pub const MAX_STANDARD_TX_SIGOPS_COST: u32 = MAX_BLOCK_SIGOPS_COST as u32 / 5;
|
pub const MAX_STANDARD_TX_SIGOPS_COST: u32 = MAX_BLOCK_SIGOPS_COST as u32 / 5;
|
||||||
|
|
Loading…
Reference in New Issue