mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 22:54:26 +01:00
lnwire+lnd: Make Logging Messages Great Again
This commit modifies the login of sent/recv’d wire messages in trace mode in order utilize the more detailed, and automatically generated logging statements using pure spew.Sdump. In order to avoid the spammy messages due to spew printing the btcec.S256() curve paramter within wire messages with public keys, we introduce a new logging function to unset the curve paramter to it isn’t printed in its entirety. To insure we don’t run into any panics as a result of a nil pointer defense, we now copy the public keys during the funding process so we don’t run into a panic due to modifying a pointer to the same object.
This commit is contained in:
@@ -119,20 +119,3 @@ func (c *CommitSignature) Validate() error {
|
||||
// We're good!
|
||||
return nil
|
||||
}
|
||||
|
||||
// String returns the string representation of the target CommitSignature.
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *CommitSignature) String() string {
|
||||
var serializedSig []byte
|
||||
if c.CommitSig != nil {
|
||||
serializedSig = c.CommitSig.Serialize()
|
||||
}
|
||||
|
||||
return fmt.Sprintf("\n--- Begin CommitSignature ---\n") +
|
||||
fmt.Sprintf("ChannelPoint:\t%v\n", c.ChannelPoint) +
|
||||
fmt.Sprintf("LogIndex:\t\t%v\n", c.LogIndex) +
|
||||
fmt.Sprintf("Fee:\t\t\t%s\n", c.Fee.String()) +
|
||||
fmt.Sprintf("CommitSig:\t\t%x\n", serializedSig) +
|
||||
fmt.Sprintf("--- End CommitSignature ---\n")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user