Skip to content

Commit 32a2bb1

Browse files
committed
f Address Antoine's feedback
1 parent 1bf0e7f commit 32a2bb1

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

lightning/src/chain/keysinterface.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// licenses.
99

1010
//! Provides keys to LDK and defines some useful objects describing spendable on-chain outputs.
11+
//!
12+
//! The provided output descriptors follow a custom LDK data format and are currently not fully
13+
//! compatible with Bitcoin Core output descriptors.
1114
1215
use bitcoin::blockdata::transaction::{Transaction, TxOut, TxIn, EcdsaSighashType};
1316
use bitcoin::blockdata::script::{Script, Builder};
@@ -106,7 +109,7 @@ pub struct StaticPaymentOutputDescriptor {
106109
/// Arbitrary identification information returned by a call to [`BaseSign::channel_keys_id`].
107110
/// This may be useful in re-deriving keys used in the channel to spend the output.
108111
pub channel_keys_id: [u8; 32],
109-
/// The value of the channel which this transaction spends.
112+
/// The value of the funding channel output which this transaction spends.
110113
pub channel_value_satoshis: u64,
111114
}
112115
impl StaticPaymentOutputDescriptor {
@@ -157,7 +160,8 @@ pub enum SpendableOutputDescriptor {
157160
///
158161
/// Note that the `nSequence` field in the spending input must be set to `to_self_delay` (which
159162
/// means the transaction is not broadcastable until at least `to_self_delay` blocks after the
160-
/// outpoint confirms).
163+
/// outpoint confirms, see [BIP
164+
/// 68](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki)).
161165
///
162166
/// These are generally the result of a "revocable" output to us, spendable only by us unless
163167
/// it is an output from an old state which we broadcast (which should never happen).
@@ -282,8 +286,9 @@ pub trait BaseSign {
282286
/// This will only ever be called with a non-revoked `commitment_tx`. This will be called with the
283287
/// latest `commitment_tx` when we initiate a force-close.
284288
/// This will be called with the previous latest `commitment_tx`, just to get claiming HTLC
285-
/// signatures, if we are reacting to a [`ChannelMonitor`] replica that decided to broadcast before
286-
/// it had been updated to the latest `commitment_tx`.
289+
/// signatures, if we are reacting to a [`ChannelMonitor`]
290+
/// [replica](https://github.com/lightningdevkit/rust-lightning/blob/main/GLOSSARY.md#monitor-replicas)
291+
/// that decided to broadcast before it had been updated to the latest `commitment_tx`.
287292
/// This may be called multiple times for the same transaction.
288293
///
289294
/// An external signer implementation should check that the commitment has not been revoked.
@@ -343,7 +348,7 @@ pub trait BaseSign {
343348
/// signed for here. It may be called multiple times for same output(s) if a fee-bump is
344349
/// needed with regards to an upcoming timelock expiration.
345350
///
346-
/// `witness_script` is either a offered or received script as defined in BOLT3 for HTLC
351+
/// `witness_script` is either an offered or received script as defined in BOLT3 for HTLC
347352
/// outputs.
348353
///
349354
/// `amount` is value of the output spent by this input, committed to in the BIP 143 signature.
@@ -513,13 +518,13 @@ pub trait KeysInterface {
513518
/// This implementation performs no policy checks and is insufficient by itself as
514519
/// a secure external signer.
515520
pub struct InMemorySigner {
516-
/// Private key of anchor tx.
521+
/// Private key of an anchor transaction.
517522
pub funding_key: SecretKey,
518523
/// Holder secret key for blinded revocation pubkey.
519524
pub revocation_base_key: SecretKey,
520525
/// Holder secret key used for our balance in counterparty-broadcasted commitment transactions.
521526
pub payment_key: SecretKey,
522-
/// Holder secret key used in HTLC tx.
527+
/// Holder secret key used in an HTLC transaction.
523528
pub delayed_payment_base_key: SecretKey,
524529
/// Holder HTLC secret key used in commitment transaction HTLC outputs.
525530
pub htlc_base_key: SecretKey,

0 commit comments

Comments
 (0)