Skip to content

Commit dd36d2d

Browse files
committed
lnwire: add string method to channel_ready type
1 parent 42499e0 commit dd36d2d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lnwire/channel_ready.go

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package lnwire
22

33
import (
44
"bytes"
5+
"fmt"
56
"io"
67

78
"github.com/btcsuite/btcd/btcec/v2"
@@ -170,3 +171,10 @@ func (c *ChannelReady) Encode(w *bytes.Buffer, _ uint32) error {
170171
func (c *ChannelReady) MsgType() MessageType {
171172
return MsgChannelReady
172173
}
174+
175+
// String returns a human-readable description of the ChannelReady msg.
176+
func (c *ChannelReady) String() string {
177+
return fmt.Sprintf("chan_id=%v, next_point=%x, aliasSCID=%v(uint=%d)",
178+
c.ChanID, c.NextPerCommitmentPoint.SerializeCompressed(),
179+
c.AliasScid, c.AliasScid.ToUint64())
180+
}

0 commit comments

Comments
 (0)