File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -5701,6 +5701,14 @@ impl<SP: Deref> Channel<SP> where
5701
5701
}
5702
5702
5703
5703
if let Some(ref mut signing_session) = self.interactive_tx_signing_session {
5704
+ if msg.tx_hash != signing_session.unsigned_tx.compute_txid() {
5705
+ return Err(ChannelError::Close(
5706
+ (
5707
+ "The txid for the transaction does not match".to_string(),
5708
+ ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(false) },
5709
+ )));
5710
+ }
5711
+
5704
5712
if msg.witnesses.len() != signing_session.remote_inputs_count() {
5705
5713
return Err(ChannelError::Warn(
5706
5714
"Witness count did not match contributed input count".to_string()
@@ -5722,14 +5730,6 @@ impl<SP: Deref> Channel<SP> where
5722
5730
// for spending. Doesn't seem to be anything in rust-bitcoin.
5723
5731
}
5724
5732
5725
- if msg.tx_hash != signing_session.unsigned_tx.compute_txid() {
5726
- return Err(ChannelError::Close(
5727
- (
5728
- "The txid for the transaction does not match".to_string(),
5729
- ClosureReason::HolderForceClosed { broadcasted_latest_txn: Some(false) },
5730
- )));
5731
- }
5732
-
5733
5733
let (tx_signatures_opt, funding_tx_opt) = signing_session.received_tx_signatures(msg.clone())
5734
5734
.map_err(|_| ChannelError::Warn("Witness count did not match contributed input count".to_string()))?;
5735
5735
if funding_tx_opt.is_some() {
You can’t perform that action at this time.
0 commit comments