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:
Olaoluwa Osuntokun
2018-12-09 18:27:41 -08:00
parent e6623f98b3
commit 4226232881
31 changed files with 125 additions and 125 deletions

View File

@@ -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,