+
+ if has_penalty_tx == PenaltyType::HTLC {
+ let revoked_tx = revoked_tx.unwrap();
+ for tx in node_txn.iter() {
+ if tx.input.len() == 1 && tx.input[0].previous_output.txid == revoked_tx.txid() {
+ let mut funding_tx_map = HashMap::new();
+ funding_tx_map.insert(revoked_tx.txid(), revoked_tx.clone());
+ tx.verify(&funding_tx_map).unwrap();
+ res.push(tx.clone());
+ break;
+ }
+ }
+ assert_eq!(res.len(), 1);
+ }