mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
lnwire: export ReadElements and WriteElements
In this commit, we export the ReadElements and WriteElements functions. We do this as exporting these functions makes it possible for outside packages to define serializations which use the BOLT 1.0 wire format.
This commit is contained in:
@@ -98,7 +98,7 @@ var _ Message = (*AcceptChannel)(nil)
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (a *AcceptChannel) Encode(w io.Writer, pver uint32) error {
|
||||
return writeElements(w,
|
||||
return WriteElements(w,
|
||||
a.PendingChannelID[:],
|
||||
a.DustLimit,
|
||||
a.MaxValueInFlight,
|
||||
@@ -122,7 +122,7 @@ func (a *AcceptChannel) Encode(w io.Writer, pver uint32) error {
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (a *AcceptChannel) Decode(r io.Reader, pver uint32) error {
|
||||
return readElements(r,
|
||||
return ReadElements(r,
|
||||
a.PendingChannelID[:],
|
||||
&a.DustLimit,
|
||||
&a.MaxValueInFlight,
|
||||
|
Reference in New Issue
Block a user