mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
Merge pull request #281 from ariard/harden-inbound-htlc-resolved
Harden test for logging of inbound htlc being resolved
This commit is contained in:
commit
0faf7bb094
1 changed files with 4 additions and 1 deletions
|
@ -1844,9 +1844,12 @@ impl ChannelMonitor {
|
|||
}
|
||||
if payment_data.is_none() {
|
||||
for htlc_output in $htlc_outputs {
|
||||
if input.previous_output.vout == htlc_output.transaction_output_index {
|
||||
if input.previous_output.vout == htlc_output.transaction_output_index && !htlc_output.offered {
|
||||
log_info!(self, "Input spending {}:{} in {} resolves inbound HTLC with timeout from {}", input.previous_output.txid, input.previous_output.vout, tx.txid(), $source);
|
||||
continue 'outer_loop;
|
||||
} else if input.previous_output.vout == htlc_output.transaction_output_index && tx.lock_time > 0 {
|
||||
log_info!(self, "Input spending {}:{} in {} resolves offered HTLC with HTLC-timeout from {}", input.previous_output.txid, input.previous_output.vout, tx.txid(), $source);
|
||||
continue 'outer_loop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue