Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.

Commit 49ce68e

Browse files
committed
f Fix package collections
1 parent de1fb85 commit 49ce68e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

client/src/client_sync/v28/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//!
55
//! We ignore option arguments unless they effect the shape of the returned JSON data.
66
7+
pub mod raw_transactions;
8+
79
use bitcoin::address::{Address, NetworkChecked};
810
use bitcoin::{Amount, Block, BlockHash, Txid};
911

client/src/client_sync/v28/raw_transactions.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,17 @@ macro_rules! impl_client_v28__submitpackage {
3535
max_fee_rate: Option<bitcoin::FeeRate>,
3636
max_burn_amount: Option<bitcoin::Amount>,
3737
) -> Result<SubmitPackage> {
38-
let package_txs = package.map(|tx| bitcoin::consensus::encode::serialize_hex(tx)).collect();
39-
let max_fee_rate_btc_kvb = max_fee_rate.map(|r| r.to_sat_per_vb_floor() as f64 / 100_000.0);
38+
let package_txs = package
39+
.into_iter()
40+
.map(|tx| bitcoin::consensus::encode::serialize_hex(tx))
41+
.collect::<Vec<_>>();
42+
let max_fee_rate_btc_kvb =
43+
max_fee_rate.map(|r| r.to_sat_per_vb_floor() as f64 / 100_000.0);
4044
let max_burn_amount_btc = max_burn_amount.map(|a| a.to_btc());
41-
self.call("submitpackage", &[package_txs.into(), max_fee_rate_btc_kvb.into(), max_burn_amount_btc.into()])
45+
self.call(
46+
"submitpackage",
47+
&[package_txs.into(), max_fee_rate_btc_kvb.into(), max_burn_amount_btc.into()],
48+
)
4249
}
4350
}
4451
};

0 commit comments

Comments
 (0)