multi: fix linter errors
This commit is contained in:
parent
3207c8a736
commit
21baa7bf18
@ -1790,7 +1790,8 @@ func (c *OpenChannel) RemoveFwdPkg(height uint64) error {
|
||||
|
||||
// RevocationLogTail returns the "tail", or the end of the current revocation
|
||||
// log. This entry represents the last previous state for the remote node's
|
||||
// commitment chain. The ChannelDelta returned by this method will always lag one state behind the most current (unrevoked) state of the remote node's
|
||||
// commitment chain. The ChannelDelta returned by this method will always lag
|
||||
// one state behind the most current (unrevoked) state of the remote node's
|
||||
// commitment chain.
|
||||
func (c *OpenChannel) RevocationLogTail() (*ChannelCommitment, error) {
|
||||
c.RLock()
|
||||
|
@ -1194,11 +1194,7 @@ func (s *Switch) handlePacketForward(packet *htlcPacket) error {
|
||||
fail.Reason = circuit.ErrorEncrypter.EncryptMalformedError(
|
||||
fail.Reason,
|
||||
)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("unable to obfuscate "+
|
||||
"error: %v", err)
|
||||
log.Error(err)
|
||||
}
|
||||
|
||||
default:
|
||||
// Otherwise, it's a forwarded error, so we'll perform a
|
||||
// wrapper encryption as normal.
|
||||
|
@ -11,14 +11,14 @@ import (
|
||||
|
||||
var (
|
||||
testRootKey = []byte("dummyRootKey")
|
||||
testId = []byte("dummyId")
|
||||
testID = []byte("dummyId")
|
||||
testLocation = "lnd"
|
||||
testVersion = macaroon.LatestVersion
|
||||
expectedTimeCaveatSubstring = "time-before " + string(time.Now().Year())
|
||||
)
|
||||
|
||||
func createDummyMacaroon(t *testing.T) *macaroon.Macaroon {
|
||||
dummyMacaroon, err := macaroon.New(testRootKey, testId,
|
||||
dummyMacaroon, err := macaroon.New(testRootKey, testID,
|
||||
testLocation, testVersion)
|
||||
if err != nil {
|
||||
t.Fatalf("Error creating initial macaroon: %v", err)
|
||||
|
@ -665,7 +665,7 @@ func (c *ClientDB) RegisterChannel(chanID lnwire.ChannelID,
|
||||
case err == ErrChannelNotRegistered:
|
||||
|
||||
// Unexpected error.
|
||||
case err != nil:
|
||||
default:
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ func ReadElement(r io.Reader, element interface{}) error {
|
||||
return nil
|
||||
|
||||
// Fail if error is not UnknownElementType.
|
||||
case err != nil:
|
||||
default:
|
||||
if _, ok := err.(UnknownElementType); !ok {
|
||||
return err
|
||||
}
|
||||
@ -80,7 +80,7 @@ func WriteElement(w io.Writer, element interface{}) error {
|
||||
return nil
|
||||
|
||||
// Fail if error is not UnknownElementType.
|
||||
case err != nil:
|
||||
default:
|
||||
if _, ok := err.(UnknownElementType); !ok {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user