multi: fix linter errors

This commit is contained in:
Olaoluwa Osuntokun 2017-08-22 01:00:07 -07:00
parent ed3268b988
commit 2b2a3714c1
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
4 changed files with 9 additions and 7 deletions

@ -722,7 +722,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(nMsg *networkMsg) []l
// within the database for our path finding and syncing needs.
var featureBuf bytes.Buffer
if err := msg.Features.Encode(&featureBuf); err != nil {
log.Error("unable to encode features: %v", err)
log.Errorf("unable to encode features: %v", err)
nMsg.err <- err
return nil
}

@ -87,7 +87,7 @@ func writeElement(w io.Writer, element interface{}) error {
}
case *btcec.PublicKey:
if e == nil {
fmt.Errorf("cannot write nil pubkey")
return fmt.Errorf("cannot write nil pubkey")
}
var b [33]byte

@ -834,8 +834,8 @@ func DecodeFailure(r io.Reader, pver uint32) (FailureMessage, error) {
return nil, err
}
if failureLength > failureMessageLength {
return nil, errors.New(fmt.Sprintf("failure message is too "+
"long: %v", failureLength))
return nil, fmt.Errorf("failure message is too "+
"long: %v", failureLength)
}
failureData := make([]byte, failureLength)
if _, err := io.ReadFull(r, failureData); err != nil {
@ -900,8 +900,8 @@ func EncodeFailure(w io.Writer, failure FailureMessage, pver uint32) error {
// failure message length.
failureMessage := failureMessageBuffer.Bytes()
if len(failureMessage) > failureMessageLength {
return errors.New(fmt.Sprintf("failure message exceed max "+
"available size: %v", len(failureMessage)))
return fmt.Errorf("failure message exceed max "+
"available size: %v", len(failureMessage))
}
// Finally, we'll add some padding in order to ensure that all failure

@ -2771,7 +2771,9 @@ func (r *rpcServer) FeeReport(ctx context.Context,
return nil, err
}
return &lnrpc.FeeReportResponse{feeReports}, nil
return &lnrpc.FeeReportResponse{
ChannelFees: feeReports,
}, nil
}
// minFeeRate is the smallest permitted fee rate within the network. This is