+//! 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;
/// 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
}
impl ChainWatchInterfaceUtil {
+ /// Creates a new ChainWatchInterfaceUtil for the given network
pub fn new(network: Network, logger: Arc<Logger>) -> ChainWatchInterfaceUtil {
ChainWatchInterfaceUtil {
network: network,