Skip to content

Commit f48c8a5

Browse files
committed
adding txids to filter during runtime
1 parent e770183 commit f48c8a5

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lightning/src/chain/chainmonitor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ where C::Target: chain::Filter,
402402
outpoint: OutPoint { txid, index: idx as u16 },
403403
script_pubkey: output.script_pubkey,
404404
};
405-
chain_source.register_output(output)
405+
chain_source.register_output(output);
406+
log_trace!(self.logger, "Adding txid {} to the filter", txid);
406407
}
407408
}
408409
}

lightning/src/chain/channelmonitor.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,14 +1343,9 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
13431343
/// Loads the funding txo and outputs to watch into the given `chain::Filter` by repeatedly
13441344
/// calling `chain::Filter::register_output` and `chain::Filter::register_tx` until all outputs
13451345
/// have been registered.
1346-
pub fn load_outputs_to_watch<F: Deref , L: Deref>(
1347-
&self,
1348-
filter: &F,
1349-
logger: &L,
1350-
)
1346+
pub fn load_outputs_to_watch<F: Deref , L: Deref>(&self, filter: &F,logger: &L,)
13511347
where
1352-
F::Target: chain::Filter,
1353-
L::Target: Logger,
1348+
F::Target: chain::Filter, L::Target: Logger,
13541349
{
13551350
let lock = self.inner.lock().unwrap();
13561351
filter.register_tx(&lock.get_funding_txo().0.txid, &lock.get_funding_txo().1);

0 commit comments

Comments
 (0)