Skip to content

Commit 0a426a3

Browse files
committed
Adding a separate error enum for proof of reserves
1 parent 412f353 commit 0a426a3

File tree

4 files changed

+103
-161
lines changed

4 files changed

+103
-161
lines changed

.github/workflows/cont_integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- esplora,key-value-db,electrum
2424
- compiler
2525
- rpc
26+
- reserves
2627
steps:
2728
- name: checkout
2829
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
@@ -60,7 +59,7 @@ async-interface = ["async-trait"]
6059
all-keys = ["keys-bip39"]
6160
keys-bip39 = ["tiny-bip39"]
6261
rpc = ["bitcoincore-rpc"]
63-
reserves = ["bitcoinconsensus", "bitcoin_hashes", "base64"]
62+
reserves = ["bitcoinconsensus", "base64", "electrum"]
6463

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

src/error.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,9 @@ pub enum Error {
6767
},
6868
/// Node doesn't have data to estimate a fee rate
6969
FeeRateUnavailable,
70-
/// The proof of reserves is invalid. The reason is given in the string parameter.
71-
ProofOfReservesInvalid(String),
72-
/// Cannot verify the proof.
73-
CannotVerifyProof,
70+
/// Proof error
71+
#[cfg(feature = "reserves")]
72+
Proof(crate::wallet::reserves::ProofError),
7473
/// In order to use the [`TxBuilder::add_global_xpubs`] option every extended
7574
/// key in the descriptor must either be a master key itself (having depth = 0) or have an
7675
/// explicit origin provided

0 commit comments

Comments
 (0)