File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ pub struct Tx {
126126 /// The [`Transaction`] size in raw bytes (NOT virtual bytes).
127127 pub size : usize ,
128128 /// The [`Transaction`]'s weight units.
129- pub weight : u64 ,
129+ pub weight : Weight ,
130130 /// The confirmation status of the [`Transaction`].
131131 pub status : TxStatus ,
132132 /// The fee amount paid by the [`Transaction`], in satoshis.
@@ -411,11 +411,6 @@ impl Tx {
411411 } )
412412 . collect ( )
413413 }
414-
415- /// Get the weight of a [`Tx`].
416- pub fn weight ( & self ) -> Weight {
417- Weight :: from_wu ( self . weight )
418- }
419414}
420415
421416fn deserialize_witness < ' de , D > ( d : D ) -> Result < Vec < Vec < u8 > > , D :: Error >
Original file line number Diff line number Diff line change @@ -574,7 +574,7 @@ mod test {
574574 assert_eq ! ( tx_info. txid, txid) ;
575575 assert_eq ! ( tx_info. to_tx( ) , tx_exp) ;
576576 assert_eq ! ( tx_info. size, tx_exp. total_size( ) ) ;
577- assert_eq ! ( tx_info. weight( ) , tx_exp. weight( ) ) ;
577+ assert_eq ! ( tx_info. weight, tx_exp. weight( ) ) ;
578578 assert_eq ! ( tx_info. fee, tx_res. fee. unwrap( ) . unsigned_abs( ) ) ;
579579 assert ! ( tx_info. status. confirmed) ;
580580 assert_eq ! ( tx_info. status. block_height, Some ( tx_block_height) ) ;
You can’t perform that action at this time.
0 commit comments