mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Remove bitcoincorerpcchain, as it belongs in a separate crate
This commit is contained in:
parent
5481a5d653
commit
738638fad4
2 changed files with 0 additions and 44 deletions
|
@ -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<ChainListener>) {
|
|
||||||
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(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +1 @@
|
||||||
pub mod chaininterface;
|
pub mod chaininterface;
|
||||||
pub mod bitcoincorerpcchain;
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue