Merge rust-bitcoin/rust-bitcoin#1968: Add max standard tx weight constant to transaction
2e3006a729
Add max standard tx weight constant to transaction (yancy) Pull request description: Add a constant for the max transaction weight. Similar to [max block weight](1b009b809b/bitcoin/src/blockdata/weight.rs (L35)
). This value is pulled from core [here](44b05bf3fe/src/policy/policy.h (L27)
) ACKs for top commit: apoelstra: ACK2e3006a729
sanket1729: ACK2e3006a729
Tree-SHA512: 1583695f43387538f948be85ded7ff9a4bf9778169acb958debcbe1572a6dc8bfcd26ddfb8dbe0c030c98ab1f8a66d239a5bc663bf65ec3376a46d5f71e90894
This commit is contained in:
commit
caf53d755d
|
@ -612,6 +612,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
|
||||||
|
|
Loading…
Reference in New Issue