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() {
446
446
. expect ( "transaction fee rate" ) ;
447
447
448
448
// 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.
451
451
452
452
// tx weight = 464 wu, as vbytes = (464)/4 = 116
453
453
// fee rate (sats per kwu) = fee / weight = 1000sat / 0.464kwu = 2155
@@ -832,6 +832,9 @@ fn test_create_tx_default_sequence() {
832
832
assert_eq ! ( psbt. unsigned_tx. input[ 0 ] . sequence, Sequence ( 0xFFFFFFFD ) ) ;
833
833
}
834
834
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.
835
838
macro_rules! check_fee {
836
839
( $wallet: expr, $psbt: expr) => { {
837
840
let tx = $psbt. clone( ) . extract_tx( ) . expect( "failed to extract tx" ) ;
You can’t perform that action at this time.
0 commit comments