From 4e05b107a3a42a770efb422b15f6cc4e49de2eac Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 20 Feb 2018 23:16:26 -0500 Subject: [PATCH] Add some light docs, rm empty walletinterface (better as events) --- src/chain/chaininterface.rs | 8 ++++++++ src/lib.rs | 1 - src/wallet/mod.rs | 1 - src/wallet/walletinterface.rs | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 src/wallet/mod.rs delete mode 100644 src/wallet/walletinterface.rs diff --git a/src/chain/chaininterface.rs b/src/chain/chaininterface.rs index ef8f9bf15..ad298ce94 100644 --- a/src/chain/chaininterface.rs +++ b/src/chain/chaininterface.rs @@ -7,6 +7,9 @@ use std::sync::{Weak,Mutex}; /// An interface to request notification of certain scripts as they appear the /// chain. +/// Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're +/// called from inside the library in response to ChainListener events, P2P events, or timer +/// events). pub trait ChainWatchInterface: Sync + Send { /// Provides a scriptPubKey which much be watched for. fn install_watch_script(&self, script_pub_key: Script); @@ -45,6 +48,11 @@ pub enum ConfirmationTarget { HighPriority, } +/// A trait which should be implemented to provide feerate information on a number of time +/// horizons. +/// Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're +/// called from inside the library in response to ChainListener events, P2P events, or timer +/// events). pub trait FeeEstimator: Sync + Send { fn get_est_sat_per_vbyte(&self, ConfirmationTarget) -> u64; } diff --git a/src/lib.rs b/src/lib.rs index 3d2b94d86..4a3ab2718 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,6 +7,5 @@ extern crate crypto; extern crate num; //TODO: Convince andrew to not rely on this for fucking casting... pub mod chain; -pub mod wallet; pub mod ln; pub mod util; diff --git a/src/wallet/mod.rs b/src/wallet/mod.rs deleted file mode 100644 index 0759f54f4..000000000 --- a/src/wallet/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod walletinterface; diff --git a/src/wallet/walletinterface.rs b/src/wallet/walletinterface.rs deleted file mode 100644 index 8b1378917..000000000 --- a/src/wallet/walletinterface.rs +++ /dev/null @@ -1 +0,0 @@ - -- 2.39.5