Test that we do not fail-backwards HTLCs that the remote on-chained
[rust-lightning] / src / ln / channelmonitor.rs
index 55e534c826969d3b1af39c11fe32b3ff860987f2..ded2a99dc37cf2933150d8537ec31ecfaddc073e 100644 (file)
@@ -63,6 +63,9 @@ pub trait ManyChannelMonitor: Send + Sync {
 /// If you're using this for local monitoring of your own channels, you probably want to use
 /// `OutPoint` as the key, which will give you a ManyChannelMonitor implementation.
 pub struct SimpleManyChannelMonitor<Key> {
+       #[cfg(test)] // Used in ChannelManager tests to manipulate channels directly
+       pub monitors: Mutex<HashMap<Key, ChannelMonitor>>,
+       #[cfg(not(test))]
        monitors: Mutex<HashMap<Key, ChannelMonitor>>,
        chain_monitor: Arc<ChainWatchInterface>,
        broadcaster: Arc<BroadcasterInterface>