3.7 Replace unwraps with expects

Doesn't replace unwraps on integer conversions.
This commit is contained in:
Luke Parker
2023-07-10 14:02:55 -04:00
parent 3d00d405a3
commit d75115ce13
2 changed files with 7 additions and 4 deletions

View File

@@ -339,7 +339,9 @@ impl SignMachine<Transaction> for TransactionSignMachine {
commitments[i].clone(),
cache
.taproot_key_spend_signature_hash(i, &prevouts, TapSighashType::Default)
.unwrap()
// This should never happen since the inputs align with the TX the cache was
// constructed with, and because i is always < prevouts.len()
.expect("taproot_key_spend_signature_hash failed to return a hash")
.as_ref(),
)?;
shares.push(share);