From 5bf5a823ffdbfd8df7296b78f0218ce6b33a5128 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 27 Mar 2018 14:07:47 +0200 Subject: [PATCH] contractcourt/chain_watcher: don't print curve of DoubleTweak --- contractcourt/chain_watcher.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/contractcourt/chain_watcher.go b/contractcourt/chain_watcher.go index efdeddb7..8a893e82 100644 --- a/contractcourt/chain_watcher.go +++ b/contractcourt/chain_watcher.go @@ -578,8 +578,20 @@ func (c *chainWatcher) dispatchContractBreach(spendEvent *chainntnfs.SpendDetail return fmt.Errorf("unable to create breach retribution: %v", err) } + // Nil the curve before printing. + if retribution.RemoteOutputSignDesc != nil && + retribution.RemoteOutputSignDesc.DoubleTweak != nil { + retribution.RemoteOutputSignDesc.DoubleTweak.Curve = nil + } + if retribution.LocalOutputSignDesc != nil && + retribution.LocalOutputSignDesc.DoubleTweak != nil { + retribution.LocalOutputSignDesc.DoubleTweak.Curve = nil + } + log.Debugf("Punishment breach retribution created: %v", - spew.Sdump(retribution)) + newLogClosure(func() string { + return spew.Sdump(retribution) + })) // With the event processed, we'll now notify all subscribers of the // event.