Skip to content

Commit be4a6b8

Browse files
committed
feat: bitcoin core v25 support
1 parent 59b771d commit be4a6b8

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Cargo.lock

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

bitcoin/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ light-client = []
1313

1414
[dependencies]
1515
thiserror = "1.0"
16-
bitcoincore-rpc = { git = "https://github.com/rust-bitcoin/rust-bitcoincore-rpc", rev = "7bd815f1e1ae721404719ee8e6867064b7c68494" }
16+
bitcoincore-rpc = { git = "https://github.com/interlay/rust-bitcoincore-rpc", rev = "671a78f638179c8951c9932061fd2bb348313a2c" }
1717
hex = "0.4.2"
1818
async-trait = "0.1.40"
1919
tokio = { version = "1.0", features = ["full"] }

bitcoin/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub const DEFAULT_MAX_TX_COUNT: usize = 100_000_000;
9494
/// the bitcoin core version.
9595
/// See https://github.com/bitcoin/bitcoin/blob/833add0f48b0fad84d7b8cf9373a349e7aef20b4/src/rpc/net.cpp#L627
9696
/// and https://github.com/bitcoin/bitcoin/blob/833add0f48b0fad84d7b8cf9373a349e7aef20b4/src/clientversion.h#L33-L37
97-
pub const BITCOIN_CORE_VERSION_23: usize = 230_000;
97+
pub const BITCOIN_CORE_VERSION_26: usize = 260_000;
9898
const NOT_IN_MEMPOOL_ERROR_CODE: i32 = BitcoinRpcError::RpcInvalidAddressOrKey as i32;
9999

100100
// Time to sleep before retry on startup.
@@ -293,7 +293,7 @@ async fn connect(rpc: &Client, connection_timeout: Duration) -> Result<Network,
293293
info!("Connected to {}", chain);
294294
info!("Bitcoin version {}", version);
295295

296-
if version >= BITCOIN_CORE_VERSION_23 {
296+
if version >= BITCOIN_CORE_VERSION_26 {
297297
return Err(Error::IncompatibleVersion(version))
298298
}
299299

@@ -1003,7 +1003,9 @@ impl BitcoinCoreApi for BitcoinCore {
10031003
} else {
10041004
info!("Creating wallet {wallet_name}...");
10051005
// wallet does not exist, create
1006-
let result = self.rpc.create_wallet(wallet_name, None, None, None, None)?;
1006+
let result = self
1007+
.rpc
1008+
.create_wallet(wallet_name, None, None, None, None, Some(false))?;
10071009
if let Some(warning) = result.warning {
10081010
if !warning.is_empty() {
10091011
warn!("Received warning while creating wallet {wallet_name}: {warning}");

0 commit comments

Comments
 (0)