Skip to content

Commit ecbeeb8

Browse files
committed
feat: bitcoin core v25 support
1 parent cc8ed9c commit ecbeeb8

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

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
@@ -74,7 +74,7 @@ pub const DEFAULT_MAX_TX_COUNT: usize = 100_000_000;
7474
/// the bitcoin core version.
7575
/// See https://github.com/bitcoin/bitcoin/blob/833add0f48b0fad84d7b8cf9373a349e7aef20b4/src/rpc/net.cpp#L627
7676
/// and https://github.com/bitcoin/bitcoin/blob/833add0f48b0fad84d7b8cf9373a349e7aef20b4/src/clientversion.h#L33-L37
77-
pub const BITCOIN_CORE_VERSION_23: usize = 230_000;
77+
pub const BITCOIN_CORE_VERSION_26: usize = 260_000;
7878
const NOT_IN_MEMPOOL_ERROR_CODE: i32 = BitcoinRpcError::RpcInvalidAddressOrKey as i32;
7979

8080
// Time to sleep before retry on startup.
@@ -283,7 +283,7 @@ async fn connect(rpc: &Client, connection_timeout: Duration) -> Result<Network,
283283
info!("Connected to {}", chain);
284284
info!("Bitcoin version {}", version);
285285

286-
if version >= BITCOIN_CORE_VERSION_23 {
286+
if version >= BITCOIN_CORE_VERSION_26 {
287287
return Err(Error::IncompatibleVersion(version))
288288
}
289289

@@ -1052,7 +1052,9 @@ impl BitcoinCoreApi for BitcoinCore {
10521052
} else {
10531053
info!("Creating wallet {wallet_name}...");
10541054
// wallet does not exist, create
1055-
let result = self.rpc.create_wallet(wallet_name, None, None, None, None)?;
1055+
let result = self
1056+
.rpc
1057+
.create_wallet(wallet_name, None, None, None, None, Some(false))?;
10561058
if let Some(warning) = result.warning {
10571059
if !warning.is_empty() {
10581060
warn!("Received warning while creating wallet {wallet_name}: {warning}");

0 commit comments

Comments
 (0)