mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 15:40:59 +02:00
lnwire: re-add .String() to the lnwire.Message interface
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user