X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fln%2Fchannelmonitor.rs;h=868a5d4f7ae9c5ba16ba39f6002d8e3892165c01;hb=16fba9fd664522ac8d24111547b4;hp=8b73f0f75d48eccdf5e18d04edb27e83ff2d45be;hpb=1dbda4faedc33506e63176e6a45687b5d756fe10;p=rust-lightning diff --git a/lightning/src/ln/channelmonitor.rs b/lightning/src/ln/channelmonitor.rs index 8b73f0f7..868a5d4f 100644 --- a/lightning/src/ln/channelmonitor.rs +++ b/lightning/src/ln/channelmonitor.rs @@ -290,7 +290,7 @@ impl return Err(MonitorUpdateError("Channel monitor for given key is already present")), hash_map::Entry::Vacant(e) => e, }; - match monitor.key_storage.funding_info { + match monitor.onchain_detection.funding_info { None => { return Err(MonitorUpdateError("Try to update a useless monitor without funding_txo !")); }, @@ -314,7 +314,7 @@ impl { - log_trace!(self, "Updating Channel Monitor for channel {}", log_funding_info!(orig_monitor.key_storage)); + log_trace!(self, "Updating Channel Monitor for channel {}", log_funding_info!(orig_monitor.onchain_detection)); orig_monitor.update_monitor(update, &self.broadcaster) }, None => Err(MonitorUpdateError("No such monitor registered")) @@ -391,7 +391,7 @@ pub(crate) const LATENCY_GRACE_PERIOD_BLOCKS: u32 = 3; /// keeping bumping another claim tx to solve the outpoint. pub(crate) const ANTI_REORG_DELAY: u32 = 6; -struct Storage { +struct OnchainDetection { keys: ChanSigner, funding_key: SecretKey, revocation_base_key: SecretKey, @@ -404,7 +404,7 @@ struct Storage { } #[cfg(any(test, feature = "fuzztarget"))] -impl PartialEq for Storage { +impl PartialEq for OnchainDetection { fn eq(&self, other: &Self) -> bool { self.keys.pubkeys() == other.keys.pubkeys() } @@ -737,7 +737,7 @@ pub struct ChannelMonitor { broadcasted_remote_payment_script: Option<(Script, SecretKey)>, shutdown_script: Script, - key_storage: Storage, + onchain_detection: OnchainDetection, their_htlc_base_key: Option, their_delayed_payment_base_key: Option, funding_redeemscript: Option