From 738638fad4bed3f0001bfbc50a5e5ea2a11165af Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 14 Jun 2018 16:48:06 -0400 Subject: [PATCH] Remove bitcoincorerpcchain, as it belongs in a separate crate --- src/chain/bitcoincorerpcchain.rs | 43 -------------------------------- src/chain/mod.rs | 1 - 2 files changed, 44 deletions(-) delete mode 100644 src/chain/bitcoincorerpcchain.rs diff --git a/src/chain/bitcoincorerpcchain.rs b/src/chain/bitcoincorerpcchain.rs deleted file mode 100644 index 5c14b5da0..000000000 --- a/src/chain/bitcoincorerpcchain.rs +++ /dev/null @@ -1,43 +0,0 @@ -use bitcoin::blockdata::transaction::Transaction; -use bitcoin::blockdata::script::Script; -use bitcoin::util::hash::Sha256dHash; - -use chain::chaininterface::{ChainWatchInterface,ChainWatchInterfaceUtil,ChainListener, BroadcasterInterface}; - -use std::sync::Weak; - -pub struct BitcoinCoreRPCClientChain { - util: ChainWatchInterfaceUtil -} - -impl ChainWatchInterface for BitcoinCoreRPCClientChain { - fn install_watch_script(&self, spk: Script) { - self.util.install_watch_script(spk) - } - - fn install_watch_outpoint(&self, outpoint: (Sha256dHash, u32)) { - self.util.install_watch_outpoint(outpoint) - } - - fn watch_all_txn(&self) { - self.util.watch_all_txn() - } - - fn register_listener(&self, listener: Weak) { - self.util.register_listener(listener) - } -} - -impl BroadcasterInterface for BitcoinCoreRPCClientChain { - fn broadcast_transaction(&self, _tx: &Transaction) { - unimplemented!() - } -} - -impl BitcoinCoreRPCClientChain { - pub fn new() -> BitcoinCoreRPCClientChain { - BitcoinCoreRPCClientChain { - util: ChainWatchInterfaceUtil::new(), - } - } -} diff --git a/src/chain/mod.rs b/src/chain/mod.rs index c8a528820..4f0ac6138 100644 --- a/src/chain/mod.rs +++ b/src/chain/mod.rs @@ -1,2 +1 @@ pub mod chaininterface; -pub mod bitcoincorerpcchain; -- 2.39.5