Browse Source
Remove comment and use anyhow::context instead
bdk-0.11
Lucas Soriano del Pino
3 years ago
No known key found for this signature in database
GPG Key ID: EE611E973A1530E7
1 changed files with
6 additions and
2 deletions
-
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 |
|
|