Skip to content

Commit 7a2b1bc

Browse files
committed
Adding a separate error enum for proof of reserves
1 parent cdd661f commit 7a2b1bc

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
@@ -24,6 +24,7 @@ jobs:
2424
- compiler
2525
- rpc
2626
- verify
27+
- reserves
2728
steps:
2829
- name: checkout
2930
uses: actions/checkout@v2

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ lazy_static = { version = "1.4", optional = true }
3333
tiny-bip39 = { version = "^0.8", optional = true }
3434
zeroize = { version = "<1.4.0", optional = true }
3535
bitcoinconsensus = { version = "0.19.0-3", optional = true }
36-
bitcoin_hashes = { version = "^0.9", optional = true }
3736
base64 = { version = "^0.11", optional = true }
3837

3938
# Needed by bdk_blockchain_tests macro
@@ -61,7 +60,7 @@ async-interface = ["async-trait"]
6160
all-keys = ["keys-bip39"]
6261
keys-bip39 = ["tiny-bip39", "zeroize"]
6362
rpc = ["bitcoincore-rpc"]
64-
reserves = ["bitcoinconsensus", "bitcoin_hashes", "base64"]
63+
reserves = ["bitcoinconsensus", "base64", "electrum"]
6564

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

src/error.rs

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

0 commit comments

Comments
 (0)