X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Fchain%2Fmod.rs;h=c7957f0ac0f504d6d32c92035dfab8673320d933;hb=523fcb6f3f16b8cd79cd2c5f21c4f92923ccc0e3;hp=af3fbea44f84856d4d7b4aada676db3a52513f96;hpb=2342550af5325fb7a16b232fe56c4f1cbce1c295;p=rust-lightning diff --git a/lightning/src/chain/mod.rs b/lightning/src/chain/mod.rs index af3fbea4..c7957f0a 100644 --- a/lightning/src/chain/mod.rs +++ b/lightning/src/chain/mod.rs @@ -14,7 +14,7 @@ use bitcoin::blockdata::transaction::TxOut; use bitcoin::hash_types::{BlockHash, Txid}; use chain::channelmonitor::{ChannelMonitor, ChannelMonitorUpdate, ChannelMonitorUpdateErr, MonitorEvent}; -use chain::keysinterface::ChannelKeys; +use chain::keysinterface::Sign; use chain::transaction::OutPoint; pub mod chaininterface; @@ -67,10 +67,7 @@ pub trait Access: Send + Sync { /// [`ChannelMonitor`]: channelmonitor/struct.ChannelMonitor.html /// [`ChannelMonitorUpdateErr`]: channelmonitor/enum.ChannelMonitorUpdateErr.html /// [`PermanentFailure`]: channelmonitor/enum.ChannelMonitorUpdateErr.html#variant.PermanentFailure -pub trait Watch: Send + Sync { - /// Keys needed by monitors for creating and signing transactions. - type Keys: ChannelKeys; - +pub trait Watch: Send + Sync { /// Watches a channel identified by `funding_txo` using `monitor`. /// /// Implementations are responsible for watching the chain for the funding transaction along @@ -80,7 +77,7 @@ pub trait Watch: Send + Sync { /// [`get_outputs_to_watch`]: channelmonitor/struct.ChannelMonitor.html#method.get_outputs_to_watch /// [`block_connected`]: channelmonitor/struct.ChannelMonitor.html#method.block_connected /// [`block_disconnected`]: channelmonitor/struct.ChannelMonitor.html#method.block_disconnected - fn watch_channel(&self, funding_txo: OutPoint, monitor: ChannelMonitor) -> Result<(), ChannelMonitorUpdateErr>; + fn watch_channel(&self, funding_txo: OutPoint, monitor: ChannelMonitor) -> Result<(), ChannelMonitorUpdateErr>; /// Updates a channel identified by `funding_txo` by applying `update` to its monitor. ///