Skip to content

Commit 00a6951

Browse files
committed
f - fill docs
1 parent da939d5 commit 00a6951

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,8 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
14371437
/// justice transactions for any revoked commitment transactions. It's intended to be used
14381438
/// within an implementation of [`Persist::update_persisted_channel`], which is provided with
14391439
/// a monitor and an update. Note that this simply provides the counterparty commitment
1440-
/// transactions from an update, which may or may not have been revoked yet.
1440+
/// transactions from an update, which may or may not have been revoked yet. Once revoked,
1441+
/// signing a justice transaction can be done using [`Self::sign_justice_tx`].
14411442
///
14421443
/// It is expected that a watchtower may use this method to retrieve the latest counterparty
14431444
/// commitment transaction(s), and then hold the necessary data until a later update in which
@@ -1453,10 +1454,16 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
14531454
self.inner.lock().unwrap().counterparty_commitment_txs_from_update(update)
14541455
}
14551456

1456-
/// Wrapper around [`crate::sign::EcdsaChannelSigner::sign_justice_revoked_output`] to make
1457+
/// Wrapper around [`EcdsaChannelSigner::sign_justice_revoked_output`] to make
14571458
/// signing the justice transaction easier for implementors of
14581459
/// [`chain::chainmonitor::Persist`]. On success this method returns a fully signed
14591460
/// transaction that is ready to be broadcasted.
1461+
///
1462+
/// This method will only succeed if this monitor has received the revocation secret for the
1463+
/// provided commitment number.
1464+
///
1465+
/// [`EcdsaChannelSigner::sign_justice_revoked_output`]: crate::sign::EcdsaChannelSigner::sign_justice_revoked_output
1466+
/// [`Persist`]: crate::chain::chainmonitor::Persist
14601467
pub fn sign_justice_tx(&self, justice_tx: Transaction, input_idx: usize, value: u64, commitment_number: u64) -> Result<Transaction, ()> {
14611468
self.inner.lock().unwrap().sign_justice_tx(justice_tx, input_idx, value, commitment_number)
14621469
}

0 commit comments

Comments
 (0)