File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,18 @@ pub mod change_policy;
28
28
/// length.
29
29
pub const TXIN_BASE_WEIGHT : u32 = ( 32 + 4 + 4 + 1 ) * 4 ;
30
30
31
- /// The weight of a TXOUT without the `scriptPubkey` (and script pubkey length field).
32
- /// Just the weight of the value field.
33
- pub const TXOUT_BASE_WEIGHT : u32 = 4 * core:: mem:: size_of :: < u64 > ( ) as u32 ; // just the value
34
-
31
+ /// The weight of a TXOUT with a zero length `scriptPubkey`
32
+ pub const TXOUT_BASE_WEIGHT : u32 =
33
+ // The value
34
+ 4 * core:: mem:: size_of :: < u64 > ( ) as u32
35
+ // The spk length
36
+ + ( 4 * 1 ) ;
37
+
38
+ /// The additional weight over [`TXIN_BASE_WEIGHT`] incurred by satisfying an input with a keyspend
39
+ /// and the default sighash.
35
40
pub const TR_KEYSPEND_SATISFACTION_WEIGHT : u32 = 66 ;
36
41
37
- /// The weight of a taproot script pubkey
42
+ /// The additional weight of an output with segwit `v1` ( taproot) script pubkey over a blank output (i.e. with weight [`TXOUT_BASE_WEIGHT`]).
38
43
pub const TR_SPK_WEIGHT : u32 = ( 1 + 1 + 32 ) * 4 ; // version + push + key
39
44
40
45
/// Helper to calculate varint size. `v` is the value the varint represents.
You can’t perform that action at this time.
0 commit comments