Add log_trace on completion of monitor update restoration in Chan
authorMatt Corallo <git@bluematt.me>
Tue, 5 Mar 2019 20:35:40 +0000 (15:35 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 25 Mar 2019 20:43:26 +0000 (16:43 -0400)
src/ln/channel.rs

index b67468b3859ecd5e1a50c951ce02d6670f39d05d..b5a2f5ec28cc6af5828f5453be90ed959006ea59 100644 (file)
@@ -2336,7 +2336,12 @@ impl Channel {
 
                self.monitor_pending_revoke_and_ack = false;
                self.monitor_pending_commitment_signed = false;
-               (raa, commitment_update, self.monitor_pending_order.clone().unwrap(), forwards, failures)
+               let order = self.monitor_pending_order.clone().unwrap();
+               log_trace!(self, "Restored monitor updating resulting in {} commitment update and {} RAA, with {} first",
+                       if commitment_update.is_some() { "a" } else { "no" },
+                       if raa.is_some() { "an" } else { "no" },
+                       match order { RAACommitmentOrder::CommitmentFirst => "commitment", RAACommitmentOrder::RevokeAndACKFirst => "RAA"});
+               (raa, commitment_update, order, forwards, failures)
        }
 
        pub fn update_fee(&mut self, fee_estimator: &FeeEstimator, msg: &msgs::UpdateFee) -> Result<(), ChannelError> {