]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Clarify `Display` text for `ClosureReason::HolderForceClosed` some 2024-06-3107-nit
authorMatt Corallo <git@bluematt.me>
Tue, 11 Jun 2024 18:59:02 +0000 (18:59 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 11 Jun 2024 19:01:13 +0000 (19:01 +0000)
... to make it clear that we elected not to broadcast, rather than
failed to broadcast.

lightning/src/events/mod.rs

index 527aabb0776e99f14a97cf09d53b623c27b224ad..2805171cdbbdfb5a30b55555d3bc2194e5e23f45 100644 (file)
@@ -372,7 +372,7 @@ impl core::fmt::Display for ClosureReason {
                        ClosureReason::HolderForceClosed { broadcasted_latest_txn } => {
                                f.write_str("user force-closed the channel")?;
                                if let Some(brodcasted) = broadcasted_latest_txn {
-                                       write!(f, " and {} the latest transaction", if *brodcasted { "broadcasted" } else { "did not broadcast" })
+                                       write!(f, " and {} the latest transaction", if *brodcasted { "broadcasted" } else { "elected not to broadcast" })
                                } else {
                                        Ok(())
                                }