Skip to content

Commit be1955a

Browse files
Queue holder commit once funding tx confirms
Sets should_broadcast_commitment=true when funding confirms. Since we skip the initial broadcast when funding_seen_onchain is false, we need to queue it once funding actually hits the chain.
1 parent 4131680 commit be1955a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5363,6 +5363,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
53635363
F::Target: FeeEstimator,
53645364
L::Target: Logger,
53655365
{
5366+
let funding_seen_before = self.funding_seen_onchain;
53665367
let txn_matched = self.filter_block(txdata);
53675368

53685369
if !self.funding_seen_onchain {
@@ -5397,6 +5398,11 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
53975398

53985399
let mut watch_outputs = Vec::new();
53995400
let mut claimable_outpoints = Vec::new();
5401+
5402+
if self.is_manual_broadcast && !funding_seen_before && self.funding_seen_onchain && self.holder_tx_signed
5403+
{
5404+
should_broadcast_commitment = true;
5405+
}
54005406
'tx_iter: for tx in &txn_matched {
54015407
let txid = tx.compute_txid();
54025408
log_trace!(logger, "Transaction {} confirmed in block {}", txid , block_hash);

0 commit comments

Comments
 (0)