Skip to content

Commit 2c3ecf8

Browse files
rustaceanrobthunderbiscuit
authored andcommitted
Update bdk_kyoto to 0.17.0
With the release of `bitcoin = 0.32.9` there was a backport that unexplainably broke the P2P layer of Kyoto. This fixes the `bitcoin` version at `0.32.8` in the meantime while I investigate the behavior.
1 parent 55e370c commit 2c3ecf8

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

bdk-ffi/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bdk-ffi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ path = "uniffi-bindgen.rs"
1818
bdk_wallet = { version = "=3.0.0", features = ["all-keys", "keys-bip39", "rusqlite"] }
1919
bdk_esplora = { version = "0.22.1", default-features = false, features = ["std", "blocking", "blocking-https-rustls"] }
2020
bdk_electrum = { version = "0.23.2", default-features = false, features = ["use-rustls-ring"] }
21-
bdk_kyoto = { version = "0.16.0" }
21+
bdk_kyoto = { version = "0.17.0" }
2222

2323
uniffi = { version = "=0.30.0", features = ["cli"]}
2424
thiserror = "2.0.17"

bdk-ffi/src/kyoto.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use bdk_kyoto::bip157;
12
use bdk_kyoto::bip157::lookup_host;
23
use bdk_kyoto::bip157::tokio;
34
use bdk_kyoto::bip157::AddrV2;
@@ -6,7 +7,7 @@ use bdk_kyoto::bip157::Node;
67
use bdk_kyoto::bip157::ServiceFlags;
78
use bdk_kyoto::builder::Builder as BDKCbfBuilder;
89
use bdk_kyoto::builder::BuilderExt;
9-
use bdk_kyoto::HeaderCheckpoint;
10+
use bdk_kyoto::HashCheckpoint;
1011
use bdk_kyoto::Receiver;
1112
use bdk_kyoto::RejectReason;
1213
use bdk_kyoto::Requester;
@@ -196,25 +197,25 @@ impl CbfBuilder {
196197
if !matches!(network, Network::Bitcoin) {
197198
bdk_kyoto::ScanType::Recovery {
198199
used_script_index,
199-
checkpoint: HeaderCheckpoint::from_genesis(network),
200+
checkpoint: HashCheckpoint::from_genesis(network),
200201
}
201202
} else {
202203
match checkpoint {
203204
RecoveryPoint::GenesisBlock => bdk_kyoto::ScanType::Recovery {
204205
used_script_index,
205-
checkpoint: HeaderCheckpoint::from_genesis(wallet.network()),
206+
checkpoint: HashCheckpoint::from_genesis(wallet.network()),
206207
},
207208
RecoveryPoint::SegwitActivation => bdk_kyoto::ScanType::Recovery {
208209
used_script_index,
209-
checkpoint: HeaderCheckpoint::segwit_activation(),
210+
checkpoint: HashCheckpoint::segwit_activation(),
210211
},
211212
RecoveryPoint::TaprootActivation => bdk_kyoto::ScanType::Recovery {
212213
used_script_index,
213-
checkpoint: HeaderCheckpoint::taproot_activation(),
214+
checkpoint: HashCheckpoint::taproot_activation(),
214215
},
215216
RecoveryPoint::Other { birthday } => bdk_kyoto::ScanType::Recovery {
216217
used_script_index,
217-
checkpoint: HeaderCheckpoint::new(birthday.height, birthday.hash.0),
218+
checkpoint: HashCheckpoint::new(birthday.height, birthday.hash.0),
218219
},
219220
}
220221
}
@@ -302,9 +303,9 @@ impl CbfClient {
302303

303304
/// Broadcast a transaction to the network, erroring if the node has stopped running.
304305
pub async fn broadcast(&self, transaction: &Transaction) -> Result<Arc<Wtxid>, CbfError> {
305-
let tx = transaction.into();
306+
let tx: bip157::Transaction = transaction.into();
306307
self.sender
307-
.broadcast_tx(tx)
308+
.submit_package(tx)
308309
.await
309310
.map_err(From::from)
310311
.map(|wtxid| Arc::new(Wtxid(wtxid)))

0 commit comments

Comments
 (0)