lnd: fix latest goclean.sh lint warning
This commit is contained in:
1 parent
730c0b8cb1
commit
61991a1c89
16 files changed
+44
-88
No files matched your search
@@ -49,15 +49,10 @@ var _ Message = (*FundingLocked)(nil)
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *FundingLocked) Decode(r io.Reader, pver uint32) error {
|
||||
err := readElements(r,
|
||||
return readElements(r,
|
||||
&c.ChannelOutpoint,
|
||||
&c.ChannelID,
|
||||
&c.NextPerCommitmentPoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Encode serializes the target FundingLocked message into the passed io.Writer
|
||||
@@ -66,15 +61,10 @@ func (c *FundingLocked) Decode(r io.Reader, pver uint32) error {
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *FundingLocked) Encode(w io.Writer, pver uint32) error {
|
||||
err := writeElements(w,
|
||||
return writeElements(w,
|
||||
c.ChannelOutpoint,
|
||||
c.ChannelID,
|
||||
c.NextPerCommitmentPoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Command returns the uint32 code which uniquely identifies this message as a
|
||||
@@ -111,7 +101,8 @@ func (c *FundingLocked) MaxPayloadLength(uint32) uint32 {
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *FundingLocked) Validate() error {
|
||||
if c.NextPerCommitmentPoint == nil {
|
||||
return fmt.Errorf("The next per commitment point must be non-nil.")
|
||||
return fmt.Errorf("the next per commitment point must be " +
|
||||
"non-nil.")
|
||||
}
|
||||
|
||||
// We're good!
|
||||
|
||||
Whitespace-only changes.
@@ -112,7 +112,7 @@ func NewSingleFundingRequest(chanID uint64, chanType uint8, coinType uint64,
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *SingleFundingRequest) Decode(r io.Reader, pver uint32) error {
|
||||
err := readElements(r,
|
||||
return readElements(r,
|
||||
&c.ChannelID,
|
||||
&c.ChannelType,
|
||||
&c.CoinType,
|
||||
@@ -125,11 +125,6 @@ func (c *SingleFundingRequest) Decode(r io.Reader, pver uint32) error {
|
||||
&c.DeliveryPkScript,
|
||||
&c.DustLimit,
|
||||
&c.ConfirmationDepth)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Encode serializes the target SingleFundingRequest into the passed io.Writer
|
||||
@@ -138,7 +133,7 @@ func (c *SingleFundingRequest) Decode(r io.Reader, pver uint32) error {
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *SingleFundingRequest) Encode(w io.Writer, pver uint32) error {
|
||||
err := writeElements(w,
|
||||
return writeElements(w,
|
||||
c.ChannelID,
|
||||
c.ChannelType,
|
||||
c.CoinType,
|
||||
@@ -151,11 +146,6 @@ func (c *SingleFundingRequest) Encode(w io.Writer, pver uint32) error {
|
||||
c.DeliveryPkScript,
|
||||
c.DustLimit,
|
||||
c.ConfirmationDepth)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Command returns the uint32 code which uniquely identifies this message as a
|
||||
@@ -179,7 +169,7 @@ func (c *SingleFundingRequest) MaxPayloadLength(uint32) uint32 {
|
||||
length += 8
|
||||
|
||||
// ChannelType - 1 byte
|
||||
length += 1
|
||||
length++
|
||||
|
||||
// CoinType - 8 bytes
|
||||
length += 8
|
||||
|
||||
@@ -94,7 +94,7 @@ func (c *SingleFundingResponse) Decode(r io.Reader, pver uint32) error {
|
||||
// DeliveryPkScript (final delivery)
|
||||
// DustLimit (8)
|
||||
// ConfirmationDepth (4)
|
||||
err := readElements(r,
|
||||
return readElements(r,
|
||||
&c.ChannelID,
|
||||
&c.ChannelDerivationPoint,
|
||||
&c.CommitmentKey,
|
||||
@@ -103,11 +103,6 @@ func (c *SingleFundingResponse) Decode(r io.Reader, pver uint32) error {
|
||||
&c.DeliveryPkScript,
|
||||
&c.DustLimit,
|
||||
&c.ConfirmationDepth)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Encode serializes the target SingleFundingResponse into the passed io.Writer
|
||||
@@ -116,7 +111,7 @@ func (c *SingleFundingResponse) Decode(r io.Reader, pver uint32) error {
|
||||
//
|
||||
// This is part of the lnwire.Message interface.
|
||||
func (c *SingleFundingResponse) Encode(w io.Writer, pver uint32) error {
|
||||
err := writeElements(w,
|
||||
return writeElements(w,
|
||||
c.ChannelID,
|
||||
c.ChannelDerivationPoint,
|
||||
c.CommitmentKey,
|
||||
@@ -125,11 +120,6 @@ func (c *SingleFundingResponse) Encode(w io.Writer, pver uint32) error {
|
||||
c.DeliveryPkScript,
|
||||
c.DustLimit,
|
||||
c.ConfirmationDepth)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Command returns the uint32 code which uniquely identifies this message as a
|
||||
|
||||
Reference in new issue
Block a user