projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split out BroadcastInterface, ChainWatchInterface monitors re-enter from called listeners
[rust-lightning]
/
src
/
chain
/
bitcoincorerpcchain.rs
diff --git
a/src/chain/bitcoincorerpcchain.rs
b/src/chain/bitcoincorerpcchain.rs
index f51b1d735a2d2f88c7281c683387bd5d892533c9..5c14b5da06cf0c8cbc5df61c0a730841a4ed5324 100644
(file)
--- a/
src/chain/bitcoincorerpcchain.rs
+++ b/
src/chain/bitcoincorerpcchain.rs
@@
-2,7
+2,7
@@
use bitcoin::blockdata::transaction::Transaction;
use bitcoin::blockdata::script::Script;
use bitcoin::util::hash::Sha256dHash;
use bitcoin::blockdata::script::Script;
use bitcoin::util::hash::Sha256dHash;
-use chain::chaininterface::{ChainWatchInterface,ChainWatchInterfaceUtil,ChainListener};
+use chain::chaininterface::{ChainWatchInterface,ChainWatchInterfaceUtil,ChainListener
, BroadcasterInterface
};
use std::sync::Weak;
use std::sync::Weak;
@@
-23,15
+23,17
@@
impl ChainWatchInterface for BitcoinCoreRPCClientChain {
self.util.watch_all_txn()
}
self.util.watch_all_txn()
}
- fn broadcast_transaction(&self, _tx: &Transaction) {
- unimplemented!()
- }
-
fn register_listener(&self, listener: Weak<ChainListener>) {
self.util.register_listener(listener)
}
}
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 {
impl BitcoinCoreRPCClientChain {
pub fn new() -> BitcoinCoreRPCClientChain {
BitcoinCoreRPCClientChain {