From 4a3c7710c75381499f7502578cdce2a34f2c0679 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Mon, 5 Apr 2021 14:58:36 +0200 Subject: [PATCH] blockdata: add the maximum standard transaction weight Signed-off-by: Antoine Poinsot --- src/blockdata/constants.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/blockdata/constants.rs b/src/blockdata/constants.rs index a7108d531c..19f994c82b 100644 --- a/src/blockdata/constants.rs +++ b/src/blockdata/constants.rs @@ -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 {