Skip to content

Commit 021b95e

Browse files
Queue holder commit once manual funding hits chain
1 parent 74023dd commit 021b95e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5260,6 +5260,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
52605260
F::Target: FeeEstimator,
52615261
L::Target: Logger,
52625262
{
5263+
let funding_seen_before = self.funding_seen_onchain;
52635264
let txn_matched = self.filter_block(txdata);
52645265
for tx in &txn_matched {
52655266
let mut output_val = Amount::ZERO;
@@ -5281,6 +5282,16 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
52815282

52825283
let mut watch_outputs = Vec::new();
52835284
let mut claimable_outpoints = Vec::new();
5285+
5286+
if self.is_manual_broadcast && !funding_seen_before && self.funding_seen_onchain && self.holder_tx_signed
5287+
{
5288+
self.queue_latest_holder_commitment_txn_for_broadcast(
5289+
&broadcaster,
5290+
fee_estimator,
5291+
logger,
5292+
true,
5293+
);
5294+
}
52845295
'tx_iter: for tx in &txn_matched {
52855296
let txid = tx.compute_txid();
52865297
log_trace!(logger, "Transaction {} confirmed in block {}", txid , block_hash);

0 commit comments

Comments
 (0)