Skip to content

Commit 557b495

Browse files
committed
f - Remove ChannelManager docs that are repetitive with Confirm docs
1 parent 87481d4 commit 557b495

File tree

1 file changed

+2
-60
lines changed

1 file changed

+2
-60
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3394,21 +3394,6 @@ where
33943394
{
33953395
/// Updates channel state to take note of transactions which were confirmed in the given block
33963396
/// at the given height.
3397-
///
3398-
/// Note that you must still call (or have called) [`best_block_updated`] with the block
3399-
/// information which is included here.
3400-
///
3401-
/// This method may be called before or after [`best_block_updated`] for a given block's
3402-
/// transaction data and may be called multiple times with additional transaction data for a
3403-
/// given block.
3404-
///
3405-
/// This method may be called for a previous block after a [`best_block_updated`] call has
3406-
/// been made for a later block, however it must *not* be called with transaction data from a
3407-
/// block which is no longer in the best chain (ie where [`best_block_updated`] has already
3408-
/// been informed about a blockchain reorganization which no longer includes the block which
3409-
/// corresponds to `header`).
3410-
///
3411-
/// [`best_block_updated`]: `Self::best_block_updated`
34123397
fn transactions_confirmed(&self, header: &BlockHeader, txdata: &TransactionData, height: u32) {
34133398
// Note that we MUST NOT end up calling methods on self.chain_monitor here - we're called
34143399
// during initialization prior to the chain_monitor being fully configured in some cases.
@@ -3421,19 +3406,7 @@ where
34213406
self.do_chain_event(Some(height), |channel| channel.transactions_confirmed(&block_hash, height, txdata, &self.logger).map(|a| (a, Vec::new())));
34223407
}
34233408

3424-
/// Updates channel state with the current best blockchain tip. You should attempt to call this
3425-
/// quickly after a new block becomes available, however if multiple new blocks become
3426-
/// available at the same time, only a single `best_block_updated()` call needs to be made.
3427-
///
3428-
/// This method should also be called immediately after any block disconnections, once at the
3429-
/// reorganization fork point, and once with the new chain tip. Calling this method at the
3430-
/// blockchain reorganization fork point ensures we learn when a funding transaction which was
3431-
/// previously confirmed is reorganized out of the blockchain, ensuring we do not continue to
3432-
/// accept payments which cannot be enforced on-chain.
3433-
///
3434-
/// In both the block-connection and block-disconnection case, this method may be called either
3435-
/// once per block connected or disconnected, or simply at the fork point and new tip(s),
3436-
/// skipping any intermediary blocks.
3409+
/// Updates channel state with the current best chain tip.
34373410
fn best_block_updated(&self, header: &BlockHeader, height: u32) {
34383411
// Note that we MUST NOT end up calling methods on self.chain_monitor here - we're called
34393412
// during initialization prior to the chain_monitor being fully configured in some cases.
@@ -3463,22 +3436,6 @@ where
34633436
}
34643437

34653438
/// Gets the set of txids which should be monitored for their confirmation state.
3466-
///
3467-
/// If you're providing information about reorganizations via [`transaction_unconfirmed`], this
3468-
/// is the set of transactions which you may need to call [`transaction_unconfirmed`] for.
3469-
///
3470-
/// This may be useful to poll to determine the set of transactions which must be registered
3471-
/// with an Electrum server or for which an Electrum server needs to be polled to determine
3472-
/// transaction confirmation state.
3473-
///
3474-
/// This may update after any [`transactions_confirmed`] or [`block_connected`] call.
3475-
///
3476-
/// Note that this is NOT the set of transactions which must be included in calls to
3477-
/// [`transactions_confirmed`] if they are confirmed, but a small subset of it.
3478-
///
3479-
/// [`transactions_confirmed`]: Self::transactions_confirmed
3480-
/// [`transaction_unconfirmed`]: Self::transaction_unconfirmed
3481-
/// [`block_connected`]: chain::Listen::block_connected
34823439
fn get_relevant_txids(&self) -> Vec<Txid> {
34833440
let channel_state = self.channel_state.lock().unwrap();
34843441
let mut res = Vec::with_capacity(channel_state.short_to_id.len());
@@ -3490,22 +3447,7 @@ where
34903447
res
34913448
}
34923449

3493-
/// Marks a transaction as having been reorganized out of the blockchain.
3494-
///
3495-
/// If a transaction is included in [`get_relevant_txids`], and is no longer in the main branch
3496-
/// of the blockchain, this function should be called to indicate that the transaction should
3497-
/// be considered reorganized out.
3498-
///
3499-
/// Once this is called, the given transaction will no longer appear on [`get_relevant_txids`],
3500-
/// though this may be called repeatedly for a given transaction without issue.
3501-
///
3502-
/// Note that if the transaction is confirmed on the main chain in a different block (indicated
3503-
/// via a call to [`transactions_confirmed`]), it may re-appear in [`get_relevant_txids`], thus
3504-
/// be very wary of race-conditions wherein the final state of a transaction indicated via
3505-
/// these APIs is not the same as its state on the blockchain.
3506-
///
3507-
/// [`transactions_confirmed`]: Self::transactions_confirmed
3508-
/// [`get_relevant_txids`]: Self::get_relevant_txids
3450+
/// Marks a transaction as having been reorganized out of the best chain.
35093451
fn transaction_unconfirmed(&self, txid: &Txid) {
35103452
let _persistence_guard = PersistenceNotifierGuard::new(&self.total_consistency_lock, &self.persistence_notifier);
35113453
self.do_chain_event(None, |channel| {

0 commit comments

Comments
 (0)