Skip to content

Commit 62227ac

Browse files
committed
Adding a separate error enum for proof of reserves
1 parent 6568691 commit 62227ac

File tree

4 files changed

+90
-150
lines changed

4 files changed

+90
-150
lines changed

.github/workflows/cont_integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
- compact_filters
2323
- esplora,key-value-db,electrum
2424
- compiler
25+
- reserves
2526
steps:
2627
- name: checkout
2728
uses: actions/checkout@v2

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ socks = { version = "0.3", optional = true }
3232
lazy_static = { version = "1.4", optional = true }
3333
tiny-bip39 = { version = "^0.8", optional = true }
3434
bitcoinconsensus = { version = "0.19.0-3", optional = true }
35-
bitcoin_hashes = { version = "^0.9", optional = true }
3635
base64 = { version = "^0.11", optional = true }
3736

3837
# Needed by bdk_blockchain_tests macro
@@ -59,7 +58,7 @@ key-value-db = ["sled"]
5958
async-interface = ["async-trait"]
6059
all-keys = ["keys-bip39"]
6160
keys-bip39 = ["tiny-bip39"]
62-
reserves = ["bitcoinconsensus", "bitcoin_hashes", "base64"]
61+
reserves = ["bitcoinconsensus", "base64"]
6362

6463
# Debug/Test features
6564
test-blockchains = ["bitcoincore-rpc", "electrum-client"]

src/error.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@ pub enum Error {
6464
/// Required fee absolute value (satoshi)
6565
required: u64,
6666
},
67-
/// The proof of reserves is invalid. The reason is given in the string parameter.
68-
ProofOfReservesInvalid(String),
69-
/// Cannot verify the proof.
70-
CannotVerifyProof,
67+
/// Proof error
68+
#[cfg(feature = "reserves")]
69+
Proof(crate::wallet::reserves::ProofError),
7170
/// In order to use the [`TxBuilder::add_global_xpubs`] option every extended
7271
/// key in the descriptor must either be a master key itself (having depth = 0) or have an
7372
/// explicit origin provided

0 commit comments

Comments
 (0)