File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -446,8 +446,8 @@ fn test_legacy_get_funded_wallet_tx_fee_rate() {
446446 . expect ( "transaction fee rate" ) ;
447447
448448 // The funded wallet contains a tx with a 76_000 sats input and two outputs, one spending 25_000
449- // to a foreign address and one returning 50_000 back to the wallet as change. The remaining 1000
450- // sats are the transaction fee.
449+ // to a foreign address and one returning 50_000 back to the wallet as change. The remaining
450+ // 1000 sats are the transaction fee.
451451
452452 // tx weight = 464 wu, as vbytes = (464)/4 = 116
453453 // fee rate (sats per kwu) = fee / weight = 1000sat / 0.464kwu = 2155
@@ -832,6 +832,9 @@ fn test_create_tx_default_sequence() {
832832 assert_eq ! ( psbt. unsigned_tx. input[ 0 ] . sequence, Sequence ( 0xFFFFFFFD ) ) ;
833833}
834834
835+ /// Validate and return the transaction fee from a PSBT.
836+ /// Panics if extraction fails, fee calculation fails, or if calculated fee doesn't match PSBT's
837+ /// fee.
835838macro_rules! check_fee {
836839 ( $wallet: expr, $psbt: expr) => { {
837840 let tx = $psbt. clone( ) . extract_tx( ) . expect( "failed to extract tx" ) ;
You can’t perform that action at this time.
0 commit comments