Add max standard tx weight constant to transaction

This commit is contained in:
yancy 2023-08-01 08:48:25 +02:00
parent cdf3e30b9d
commit 2e3006a729
1 changed files with 4 additions and 0 deletions

View File

@ -678,6 +678,10 @@ impl cmp::Ord for Transaction {
} }
impl Transaction { impl Transaction {
/// Maximum transaction weight for Bitcoin Core 25.0.
// https://github.com/bitcoin/bitcoin/blob/44b05bf3fef2468783dcebf651654fdd30717e7e/src/policy/policy.h#L27
pub const MAX_STANDARD_WEIGHT: Weight = Weight::from_wu(400_000);
/// Computes a "normalized TXID" which does not include any signatures. /// Computes a "normalized TXID" which does not include any signatures.
/// ///
/// This gives a way to identify a transaction that is "the same" as /// This gives a way to identify a transaction that is "the same" as