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 committed 2018-12-24 19:58:06 -06:00
1 parent e6623f98b3
commit 4226232881
31 files changed
+125 -125

No files matched your search

+2 -2
View File
@@ -48,7 +48,7 @@ var _ Message = (*CommitSig)(nil)
//
// This is part of the lnwire.Message interface.
func (c *CommitSig) Decode(r io.Reader, pver uint32) error {
return readElements(r,
return ReadElements(r,
&c.ChanID,
&c.CommitSig,
&c.HtlcSigs,
@@ -60,7 +60,7 @@ func (c *CommitSig) Decode(r io.Reader, pver uint32) error {
//
// This is part of the lnwire.Message interface.
func (c *CommitSig) Encode(w io.Writer, pver uint32) error {
return writeElements(w,
return WriteElements(w,
c.ChanID,
c.CommitSig,
c.HtlcSigs,