Add commitment transaction broadcast as a ChannelMonitor event
[rust-lightning] / fuzz / src / chanmon_consistency.rs
index eba0cb9e4f91adcb17699623ca991aa3a6c13b7c..0fc77c58f56c4bd1c8d6d2584639da30bfeb9d42 100644 (file)
@@ -1,3 +1,12 @@
+// This file is Copyright its original authors, visible in version control
+// history.
+//
+// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
+// or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// You may not use this file except in accordance with one or both of these
+// licenses.
+
 //! Test that monitor update failures don't get our channel state out of sync.
 //! One of the biggest concern with the monitor update failure handling code is that messages
 //! resent after monitor updating is restored are delivered out-of-order, resulting in
@@ -25,7 +34,7 @@ use lightning::chain::transaction::OutPoint;
 use lightning::chain::chaininterface::{BroadcasterInterface,ConfirmationTarget,ChainListener,FeeEstimator,ChainWatchInterfaceUtil,ChainWatchInterface};
 use lightning::chain::keysinterface::{KeysInterface, InMemoryChannelKeys};
 use lightning::ln::channelmonitor;
-use lightning::ln::channelmonitor::{ChannelMonitor, ChannelMonitorUpdateErr, HTLCUpdate};
+use lightning::ln::channelmonitor::{ChannelMonitor, ChannelMonitorUpdateErr, MonitorEvent};
 use lightning::ln::channelmanager::{ChannelManager, PaymentHash, PaymentPreimage, PaymentSecret, ChannelManagerReadArgs};
 use lightning::ln::features::{ChannelFeatures, InitFeatures, NodeFeatures};
 use lightning::ln::msgs::{CommitmentUpdate, ChannelMessageHandler, ErrorAction, UpdateAddHTLC, Init};
@@ -126,8 +135,8 @@ impl channelmonitor::ManyChannelMonitor for TestChannelMonitor {
                self.update_ret.lock().unwrap().clone()
        }
 
-       fn get_and_clear_pending_htlcs_updated(&self) -> Vec<HTLCUpdate> {
-               return self.simple_monitor.get_and_clear_pending_htlcs_updated();
+       fn get_and_clear_pending_monitor_events(&self) -> Vec<MonitorEvent> {
+               return self.simple_monitor.get_and_clear_pending_monitor_events();
        }
 }