Skip to content

Commit

Permalink
lnwire: add string method to channel_ready type
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggie1984 committed Dec 16, 2024
1 parent 42499e0 commit dd36d2d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lnwire/channel_ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package lnwire

import (
"bytes"
"fmt"
"io"

"github.com/btcsuite/btcd/btcec/v2"
Expand Down Expand Up @@ -170,3 +171,10 @@ func (c *ChannelReady) Encode(w *bytes.Buffer, _ uint32) error {
func (c *ChannelReady) MsgType() MessageType {
return MsgChannelReady
}

// String returns a human-readable description of the ChannelReady msg.
func (c *ChannelReady) String() string {
return fmt.Sprintf("chan_id=%v, next_point=%x, aliasSCID=%v(uint=%d)",
c.ChanID, c.NextPerCommitmentPoint.SerializeCompressed(),
c.AliasScid, c.AliasScid.ToUint64())
}

0 comments on commit dd36d2d

Please sign in to comment.