Skip to content

Add module and all-pub-things docs and deny missing docs #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ members = ["."]
name = "peer_crypt_target"
path = "fuzz_targets/peer_crypt_target.rs"

[[bin]]
name = "channel_target"
path = "fuzz_targets/channel_target.rs"

[[bin]]
name = "full_stack_target"
path = "fuzz_targets/full_stack_target.rs"
Expand Down
347 changes: 0 additions & 347 deletions fuzz/fuzz_targets/channel_target.rs

This file was deleted.

12 changes: 12 additions & 0 deletions src/chain/chaininterface.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! Traits and utility impls which allow other parts of rust-lightning to interact with the
//! blockchain - receiving notifications of new blocks and block disconnections and allowing
//! rust-lightning to request that you monitor the chain for certain outpoints/transactions.

use bitcoin::blockdata::block::{Block, BlockHeader};
use bitcoin::blockdata::transaction::Transaction;
use bitcoin::blockdata::script::Script;
Expand Down Expand Up @@ -38,6 +42,8 @@ pub trait ChainWatchInterface: Sync + Send {
/// Indicates that a listener needs to see all transactions.
fn watch_all_txn(&self);

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

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

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

Expand Down Expand Up @@ -224,6 +235,7 @@ impl ChainWatchInterface for ChainWatchInterfaceUtil {
}

impl ChainWatchInterfaceUtil {
/// Creates a new ChainWatchInterfaceUtil for the given network
pub fn new(network: Network, logger: Arc<Logger>) -> ChainWatchInterfaceUtil {
ChainWatchInterfaceUtil {
network: network,
Expand Down
Loading