X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fchain%2Fmod.rs;h=856a9e8af62287b76f3e174f2543091361eca300;hb=c40ebf18e5b5c65944907cc5ef94a271edadf604;hp=7f99467642add8ade3a378671a4dad0fadd51598;hpb=7af9976261436fe2357a187c2aaa6792fb0506c6;p=rust-lightning diff --git a/lightning/src/chain/mod.rs b/lightning/src/chain/mod.rs index 7f994676..856a9e8a 100644 --- a/lightning/src/chain/mod.rs +++ b/lightning/src/chain/mod.rs @@ -23,6 +23,8 @@ pub mod chainmonitor; pub mod channelmonitor; pub mod transaction; pub mod keysinterface; +pub(crate) mod onchaintx; +pub(crate) mod package; /// An error when accessing the chain via [`Access`]. #[derive(Clone)] @@ -36,7 +38,7 @@ pub enum AccessError { /// The `Access` trait defines behavior for accessing chain data and state, such as blocks and /// UTXOs. -pub trait Access: Send + Sync { +pub trait Access { /// Returns the transaction output of a funding transaction encoded by [`short_channel_id`]. /// Returns an error if `genesis_hash` is for a different chain or if such a transaction output /// is unknown. @@ -161,7 +163,7 @@ pub trait Confirm { /// [`ChannelMonitor`]: channelmonitor::ChannelMonitor /// [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr /// [`PermanentFailure`]: channelmonitor::ChannelMonitorUpdateErr::PermanentFailure -pub trait Watch: Send + Sync { +pub trait Watch { /// Watches a channel identified by `funding_txo` using `monitor`. /// /// Implementations are responsible for watching the chain for the funding transaction along @@ -207,7 +209,7 @@ pub trait Watch: Send + Sync { /// [`TemporaryFailure`]: channelmonitor::ChannelMonitorUpdateErr::TemporaryFailure /// [BIP 157]: https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki /// [BIP 158]: https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki -pub trait Filter: Send + Sync { +pub trait Filter { /// Registers interest in a transaction with `txid` and having an output with `script_pubkey` as /// a spending condition. fn register_tx(&self, txid: &Txid, script_pubkey: &Script); @@ -246,7 +248,7 @@ pub struct WatchedOutput { pub script_pubkey: Script, } -impl Listen for std::ops::Deref { +impl Listen for core::ops::Deref { fn block_connected(&self, block: &Block, height: u32) { (**self).block_connected(block, height); } @@ -256,7 +258,7 @@ impl Listen for std::ops::Deref { } } -impl Listen for (T, U) +impl Listen for (T, U) where T::Target: Listen, U::Target: Listen,