File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -5501,11 +5501,16 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
5501
5501
}
5502
5502
5503
5503
if should_broadcast_commitment {
5504
- let ( mut claimables, mut outputs) =
5505
- self . generate_claimable_outpoints_and_watch_outputs ( None ) ;
5506
- if !self . is_manual_broadcast || self . funding_seen_onchain {
5507
- claimable_outpoints. append ( & mut claimables) ;
5508
- watch_outputs. append ( & mut outputs) ;
5504
+ // Only generate claims immediately if block_confirmed
5505
+ // won't also generate them to avoid duplicate registrations.
5506
+ let should_broadcast = self . should_broadcast_holder_commitment_txn ( logger) ;
5507
+ if should_broadcast. is_none ( ) {
5508
+ let ( mut claimables, mut outputs) =
5509
+ self . generate_claimable_outpoints_and_watch_outputs ( None ) ;
5510
+ if !self . is_manual_broadcast || self . funding_seen_onchain {
5511
+ claimable_outpoints. append ( & mut claimables) ;
5512
+ watch_outputs. append ( & mut outputs) ;
5513
+ }
5509
5514
}
5510
5515
}
5511
5516
You can’t perform that action at this time.
0 commit comments