Skip to content

Commit

Permalink
blockdata: add the maximum standard transaction weight
Browse files Browse the repository at this point in the history
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
  • Loading branch information
darosior committed Apr 5, 2021
1 parent 5bd6196 commit dd9e837
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/blockdata/constants.rs
Expand Up @@ -47,6 +47,8 @@ pub const MIN_TRANSACTION_WEIGHT: u32 = 4 * 60;
/// The factor that non-witness serialization data is multiplied by during weight calculation
pub const WITNESS_SCALE_FACTOR: usize = 4;

/// Maximum weight of a transaction for it to be relayed by most nodes on the network
pub const MAX_STANDARD_TRANSACTION_WEIGHT: u32 = 400_000;

/// In Bitcoind this is insanely described as ~((u256)0 >> 32)
pub fn max_target(_: Network) -> Uint256 {
Expand Down

0 comments on commit dd9e837

Please sign in to comment.