Skip to content

Commit 66fbc66

Browse files
authored
Merge pull request #192 from TheBlueMatt/2018-09-docs-docs-docs
Add module and all-pub-things docs and deny missing docs
2 parents ac821e4 + 3aeec96 commit 66fbc66

18 files changed

+495
-574
lines changed

fuzz/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ members = ["."]
3535
name = "peer_crypt_target"
3636
path = "fuzz_targets/peer_crypt_target.rs"
3737

38-
[[bin]]
39-
name = "channel_target"
40-
path = "fuzz_targets/channel_target.rs"
41-
4238
[[bin]]
4339
name = "full_stack_target"
4440
path = "fuzz_targets/full_stack_target.rs"

fuzz/fuzz_targets/channel_target.rs

Lines changed: 0 additions & 347 deletions
This file was deleted.

src/chain/chaininterface.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
//! Traits and utility impls which allow other parts of rust-lightning to interact with the
2+
//! blockchain - receiving notifications of new blocks and block disconnections and allowing
3+
//! rust-lightning to request that you monitor the chain for certain outpoints/transactions.
4+
15
use bitcoin::blockdata::block::{Block, BlockHeader};
26
use bitcoin::blockdata::transaction::Transaction;
37
use bitcoin::blockdata::script::Script;
@@ -38,6 +42,8 @@ pub trait ChainWatchInterface: Sync + Send {
3842
/// Indicates that a listener needs to see all transactions.
3943
fn watch_all_txn(&self);
4044

45+
/// Register the given listener to receive events. Only a weak pointer is provided and the
46+
/// registration should be freed once that pointer expires.
4147
fn register_listener(&self, listener: Weak<ChainListener>);
4248
//TODO: unregister
4349

@@ -70,9 +76,14 @@ pub trait ChainListener: Sync + Send {
7076
fn block_disconnected(&self, header: &BlockHeader);
7177
}
7278

79+
/// An enum that represents the speed at which we want a transaction to confirm used for feerate
80+
/// estimation.
7381
pub enum ConfirmationTarget {
82+
/// We are happy with this transaction confirming slowly when feerate drops some.
7483
Background,
84+
/// We'd like this transaction to confirm without major delay, but 12-18 blocks is fine.
7585
Normal,
86+
/// We'd like this transaction to confirm in the next few blocks.
7687
HighPriority,
7788
}
7889

@@ -224,6 +235,7 @@ impl ChainWatchInterface for ChainWatchInterfaceUtil {
224235
}
225236

226237
impl ChainWatchInterfaceUtil {
238+
/// Creates a new ChainWatchInterfaceUtil for the given network
227239
pub fn new(network: Network, logger: Arc<Logger>) -> ChainWatchInterfaceUtil {
228240
ChainWatchInterfaceUtil {
229241
network: network,

0 commit comments

Comments
 (0)