Merge pull request #967 from halseth/breachretribution-curve-nil

[mini] contractcourt/chain_watcher: don't print curve of DoubleTweak
This commit is contained in:
Olaoluwa Osuntokun 2018-03-29 15:34:51 -07:00 committed by GitHub
commit 1a8bec4ed1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.