]> git.bitcoin.ninja Git - rust-lightning/commitdiff
trace_log more in channelmonitor 2018-12-drop-rust-crypto
authorMatt Corallo <git@bluematt.me>
Thu, 20 Dec 2018 00:36:27 +0000 (19:36 -0500)
committerMatt Corallo <git@bluematt.me>
Thu, 20 Dec 2018 01:02:36 +0000 (20:02 -0500)
src/ln/channelmonitor.rs

index 9fed550982177f1d7433ddddd4e36cd98b8cd1c2..5415fefec3057c7ec1809fa171864086e6d88742 100644 (file)
@@ -568,6 +568,8 @@ impl ChannelMonitor {
                }
 
                let new_txid = unsigned_commitment_tx.txid();
+               log_trace!(self, "Tracking new remote commitment transaction with txid {} at commitment number {} with {} HTLC outputs", new_txid, commitment_number, htlc_outputs.len());
+               log_trace!(self, "New potential remote commitment transaction: {}", encode::serialize_hex(unsigned_commitment_tx));
                if let Storage::Local { ref mut current_remote_commitment_txid, ref mut prev_remote_commitment_txid, .. } = self.key_storage {
                        *prev_remote_commitment_txid = current_remote_commitment_txid.take();
                        *current_remote_commitment_txid = Some(new_txid);
@@ -1246,6 +1248,8 @@ impl ChannelMonitor {
                        watch_outputs.append(&mut tx.output.clone());
                        self.remote_commitment_txn_on_chain.insert(commitment_txid, (commitment_number, tx.output.iter().map(|output| { output.script_pubkey.clone() }).collect()));
 
+                       log_trace!(self, "Got broadcast of non-revoked remote commitment transaction {}", commitment_txid);
+
                        if let Some(revocation_points) = self.their_cur_revocation_points {
                                let revocation_point_option =
                                        if revocation_points.0 == commitment_number { Some(&revocation_points.1) }