Browse Source

Remove comment and use anyhow::context instead

bdk-0.11
Lucas Soriano del Pino 3 years ago
parent
commit
73ef2bc14a
No known key found for this signature in database GPG Key ID: EE611E973A1530E7
  1. 8
      cfd_protocol/src/lib.rs

8
cfd_protocol/src/lib.rs

@ -236,8 +236,12 @@ pub fn punish_transaction(
publish_them_pk: PublicKey, publish_them_pk: PublicKey,
revoked_commit_tx: &Transaction, revoked_commit_tx: &Transaction,
) -> Result<Transaction> { ) -> Result<Transaction> {
// CommitTransaction has only one input let input = revoked_commit_tx
let input = revoked_commit_tx.input.clone().into_iter().exactly_one()?; .input
.clone()
.into_iter()
.exactly_one()
.context("commit transaction inputs != 1")?;
let publish_them_sk = input let publish_them_sk = input
.witness .witness

Loading…
Cancel
Save