lnwire: re-add .String() to the lnwire.Message interface

This commit is contained in:
Olaoluwa Osuntokun
2016-11-10 17:47:59 -08:00
parent a4023144d3
commit 7fc6159f0a
3 changed files with 23 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
package lnwire
import "io"
import (
"fmt"
"io"
)
// Ping defines a message which is sent by peers periodically to determine if
// the connection is still valid. Each ping message should carry a unique nonce
@@ -74,3 +77,10 @@ func (p Ping) MaxPayloadLength(uint32) uint32 {
func (p *Ping) Validate() error {
return nil
}
// String returns the string representation of the target Ping.
//
// This is part of the lnwire.Message interface.
func (p *Ping) String() string {
return fmt.Sprintf("Ping(%v)", p.Nonce)
}