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:
@@ -49,7 +49,7 @@ var _ Message = (*ClosingSigned)(nil)
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *ClosingSigned) Decode(r io.Reader, pver uint32) error {
|
||||
return readElements(r, &c.ChannelID, &c.FeeSatoshis, &c.Signature)
|
||||
return ReadElements(r, &c.ChannelID, &c.FeeSatoshis, &c.Signature)
|
||||
}
|
||||
|
||||
// Encode serializes the target ClosingSigned into the passed io.Writer
|
||||
@@ -57,7 +57,7 @@ func (c *ClosingSigned) Decode(r io.Reader, pver uint32) error {
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *ClosingSigned) Encode(w io.Writer, pver uint32) error {
|
||||
return writeElements(w, c.ChannelID, c.FeeSatoshis, c.Signature)
|
||||
return WriteElements(w, c.ChannelID, c.FeeSatoshis, c.Signature)
|
||||
}
|
||||
|
||||
// MsgType returns the integer uniquely identifying this message type on the
|
||||
|
Reference in New Issue
Block a user