From 013daa60612e5e6ef76e8d42c0be04d8d08913a1 Mon Sep 17 00:00:00 2001 From: rajarshimaitra Date: Sun, 7 Aug 2022 11:53:20 +0530 Subject: [PATCH] Update to bdk v0.20.0 --- Cargo.lock | 35 ++++++++++++++--------------------- Cargo.toml | 4 ++-- src/commands.rs | 2 +- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86265a4..db1c8e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ "getrandom 0.2.7", "once_cell", @@ -80,12 +80,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - [[package]] name = "base64" version = "0.13.0" @@ -103,9 +97,9 @@ dependencies = [ [[package]] name = "bdk" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2c4c49915b82a2576bc7dee83d2f274387904b79305e6ae8b622daa0b282c1" +checksum = "5a0becbf5a97855daca6717ff920c52a779cebf655b23ae1427e5366d2661e82" dependencies = [ "ahash", "async-trait", @@ -165,11 +159,10 @@ dependencies = [ [[package]] name = "bdk-reserves" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64250f952cdfb473f80ec7e874677295b201fc9e0fc206d59982d8f9647c5b47" +checksum = "74853196bf39a8bbe3be5650c130c7e95b38fdaeae874df1dd100729d68ef4cf" dependencies = [ - "base64 0.11.0", "bdk", "bitcoinconsensus", "log", @@ -1051,9 +1044,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.22.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" +checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" dependencies = [ "pkg-config", "vcpkg", @@ -1542,7 +1535,7 @@ version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ - "base64 0.13.0", + "base64", "bytes", "encoding_rs", "futures-core", @@ -1598,9 +1591,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.25.4" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4b1eaf239b47034fb450ee9cdedd7d0226571689d8823030c4b6c2cb407152" +checksum = "85127183a999f7db96d1a976a309eebbfb6ea3b0b400ddd8340190129de6eb7a" dependencies = [ "bitflags", "fallible-iterator", @@ -1632,7 +1625,7 @@ version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64 0.13.0", + "base64", "log", "ring", "sct 0.6.1", @@ -2195,7 +2188,7 @@ version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b8b063c2d59218ae09f22b53c42eaad0d53516457905f5235ca4bc9e99daa71" dependencies = [ - "base64 0.13.0", + "base64", "chunked_transfer", "cookie", "cookie_store", @@ -2214,7 +2207,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3131cd6cb18488da91da1d10ed31e966f453c06b65bf010d35638456976a3fd7" dependencies = [ - "base64 0.13.0", + "base64", "chunked_transfer", "log", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 0c27ddb..8522b20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" license = "MIT" [dependencies] -bdk = { version = "0.19", default-features = false, features = ["all-keys"]} +bdk = { version = "0.20", default-features = false, features = ["all-keys"]} bdk-macros = "0.6" structopt = "0.3" serde_json = "1.0" @@ -25,7 +25,7 @@ env_logger = "0.7" rustyline = { version = "~9.0", optional = true } fd-lock = { version = "=3.0.2", optional = true } regex = { version = "1", optional = true } -bdk-reserves = { version = "0.19", optional = true} +bdk-reserves = { version = "0.20", optional = true} electrsd = { version= "0.19", features = ["bitcoind_22_0"], optional = true} [features] diff --git a/src/commands.rs b/src/commands.rs index b45a5fe..0360f06 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1502,7 +1502,7 @@ mod test { .unwrap(); let psbt = encode_psbt(psbt); let psbt = str::from_utf8(&psbt).unwrap(); - assert_eq!(format!("{}", psbt), "cHNidP8BAP0YAgEAAAAM0DsC5Uy7AiuQC5e0oOrDcGu6i8rY8fsT3QzMJvJoAyUAAAAAAP////8IgYfaHR37CUDGQCaLj/QMLxAFteVTnYAskOVx6wHQLgEAAAAA/////wxNB645qLQXuZJoemip3ne14b5R5GWHEDL8o20m0oiHAAAAAAD/////UII10YAYjpnNzaXu1mPht5rsUF74nrz4anfwWykHepUAAAAAAP////+yr7v1/En7kXz3nVdxunw3lVhUmh6wbXN3cDFK1wbA9gAAAAAA/////7cV00FjL7mwDKa6bLd6TEoI1EI8OszcFUnlqT8j8a2HAQAAAAD/////u193IvDJvWzXUG6xaO8zqLBJK0wKKcVdgG74x+OYVOkAAAAAAP////+80K0TirJXCaMzD5VTAsfU35C3Xkawe26Ha2/vynAarQEAAAAA/////8BRLif9KQ71JK8i/wwjZd2bfF2fvtK53q5fk/KoKBqcAQAAAAD/////0BqoaKC7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