contractcourt: nil keyring curves on breach info

This commit is contained in:
Conner Fromknecht 2018-12-19 21:50:45 -08:00
parent cd54625c2d
commit 088fb33718
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -747,13 +747,27 @@ func (c *chainWatcher) dispatchContractBreach(spendEvent *chainntnfs.SpendDetail
retribution.RemoteOutputSignDesc.DoubleTweak != nil {
retribution.RemoteOutputSignDesc.DoubleTweak.Curve = nil
}
if retribution.RemoteOutputSignDesc != nil &&
retribution.RemoteOutputSignDesc.KeyDesc.PubKey != nil {
retribution.RemoteOutputSignDesc.KeyDesc.PubKey.Curve = nil
}
if retribution.LocalOutputSignDesc != nil &&
retribution.LocalOutputSignDesc.DoubleTweak != nil {
retribution.LocalOutputSignDesc.DoubleTweak.Curve = nil
}
if retribution.LocalOutputSignDesc != nil &&
retribution.LocalOutputSignDesc.KeyDesc.PubKey != nil {
retribution.LocalOutputSignDesc.KeyDesc.PubKey.Curve = nil
}
log.Debugf("Punishment breach retribution created: %v",
newLogClosure(func() string {
retribution.KeyRing.CommitPoint.Curve = nil
retribution.KeyRing.LocalHtlcKey = nil
retribution.KeyRing.RemoteHtlcKey = nil
retribution.KeyRing.DelayKey = nil
retribution.KeyRing.NoDelayKey = nil
retribution.KeyRing.RevocationKey = nil
return spew.Sdump(retribution)
}))