htlcswitch: update messageToString helper test func to new msgs
This commit is contained in:
parent
402112e6ee
commit
f8e536dff5
@ -20,9 +20,9 @@ import (
|
|||||||
"github.com/roasbeef/btcutil"
|
"github.com/roasbeef/btcutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// messageToString is used to produce less spammy log messages in trace
|
// messageToString is used to produce less spammy log messages in trace mode by
|
||||||
// mode by setting the 'Curve" parameter to nil. Doing this avoids printing out
|
// setting the 'Curve" parameter to nil. Doing this avoids printing out each of
|
||||||
// each of the field elements in the curve parameters for secp256k1.
|
// the field elements in the curve parameters for secp256k1.
|
||||||
func messageToString(msg lnwire.Message) string {
|
func messageToString(msg lnwire.Message) string {
|
||||||
switch m := msg.(type) {
|
switch m := msg.(type) {
|
||||||
case *lnwire.RevokeAndAck:
|
case *lnwire.RevokeAndAck:
|
||||||
@ -34,15 +34,20 @@ func messageToString(msg lnwire.Message) string {
|
|||||||
m.NodeID2.Curve = nil
|
m.NodeID2.Curve = nil
|
||||||
m.BitcoinKey1.Curve = nil
|
m.BitcoinKey1.Curve = nil
|
||||||
m.BitcoinKey2.Curve = nil
|
m.BitcoinKey2.Curve = nil
|
||||||
case *lnwire.SingleFundingComplete:
|
case *lnwire.AcceptChannel:
|
||||||
m.RevocationKey.Curve = nil
|
m.FundingKey.Curve = nil
|
||||||
case *lnwire.SingleFundingRequest:
|
m.RevocationPoint.Curve = nil
|
||||||
m.CommitmentKey.Curve = nil
|
m.PaymentPoint.Curve = nil
|
||||||
m.ChannelDerivationPoint.Curve = nil
|
m.DelayedPaymentPoint.Curve = nil
|
||||||
case *lnwire.SingleFundingResponse:
|
m.FirstCommitmentPoint.Curve = nil
|
||||||
m.ChannelDerivationPoint.Curve = nil
|
case *lnwire.OpenChannel:
|
||||||
m.CommitmentKey.Curve = nil
|
m.FundingKey.Curve = nil
|
||||||
m.RevocationKey.Curve = nil
|
m.RevocationPoint.Curve = nil
|
||||||
|
m.PaymentPoint.Curve = nil
|
||||||
|
m.DelayedPaymentPoint.Curve = nil
|
||||||
|
m.FirstCommitmentPoint.Curve = nil
|
||||||
|
case *lnwire.FundingLocked:
|
||||||
|
m.NextPerCommitmentPoint.Curve = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return spew.Sdump(msg)
|
return spew.Sdump(msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user