Make sure all error messages start with an uppercase letter

These might potentially be shown to a user, let's make them all
consistent.
This commit is contained in:
Thomas Eizinger 2021-03-04 17:25:05 +11:00
parent 816e8b9b96
commit 4138039ea0
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
16 changed files with 49 additions and 39 deletions

View file

@ -23,7 +23,7 @@ pub use wallet::Wallet;
use ::bitcoin::hashes::hex::ToHex;
use ::bitcoin::hashes::Hash;
use ::bitcoin::{secp256k1, SigHash};
use anyhow::{anyhow, bail, Result};
use anyhow::{bail, Context, Result};
use ecdsa_fun::adaptor::{Adaptor, HashTranscript};
use ecdsa_fun::fun::Point;
use ecdsa_fun::nonce::Deterministic;
@ -204,7 +204,7 @@ pub fn recover(S: PublicKey, sig: Signature, encsig: EncryptedSignature) -> Resu
let s = adaptor
.recover_decryption_key(&S.0, &sig, &encsig)
.map(SecretKey::from)
.ok_or_else(|| anyhow!("secret recovery failure"))?;
.context("Failed to recover secret from adaptor signature")?;
Ok(s)
}