From: Jeffrey Czyz Date: Fri, 7 Aug 2020 22:13:57 +0000 (-0700) Subject: WIP: Remove ChainWatchedUtil X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=71c76068b5e1f368d52e335e48d704a34878b2c1;p=rust-lightning WIP: Remove ChainWatchedUtil --- diff --git a/lightning/src/chain/chaininterface.rs b/lightning/src/chain/chaininterface.rs index f9f725421..22904a017 100644 --- a/lightning/src/chain/chaininterface.rs +++ b/lightning/src/chain/chaininterface.rs @@ -5,10 +5,6 @@ //! disconnections, transaction broadcasting, and feerate information requests. use bitcoin::blockdata::transaction::Transaction; -use bitcoin::blockdata::script::Script; -use bitcoin::hash_types::Txid; - -use std::collections::HashSet; /// An interface to send a transaction to the Bitcoin network. pub trait BroadcasterInterface: Sync + Send { @@ -46,91 +42,3 @@ pub trait FeeEstimator: Sync + Send { /// Minimum relay fee as required by bitcoin network mempool policy. pub const MIN_RELAY_FEE_SAT_PER_1000_WEIGHT: u64 = 4000; - -/// Utility for tracking registered txn/outpoints and checking for matches -#[cfg_attr(test, derive(PartialEq))] -pub struct ChainWatchedUtil { - watch_all: bool, - - // We are more conservative in matching during testing to ensure everything matches *exactly*, - // even though during normal runtime we take more optimized match approaches... - #[cfg(test)] - watched_txn: HashSet<(Txid, Script)>, - #[cfg(not(test))] - watched_txn: HashSet