multi: fix dropped errors

This commit is contained in:
Joost Jager 2019-09-13 09:48:43 +02:00
parent ffb8c0cfc3
commit 1e0ed1e52f
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7
6 changed files with 10 additions and 10 deletions

View File

@ -349,7 +349,7 @@ func cipherTextToMnemonic(cipherText [EncipheredCipherSeedSize]byte) (Mnemonic,
for i := 0; i < NummnemonicWords; i++ {
index, err := cipherBits.ReadBits(bitsPerWord)
if err != nil {
return words, nil
return Mnemonic{}, err
}
words[i] = defaultWordList[index]
@ -366,7 +366,7 @@ func (c *CipherSeed) ToMnemonic(pass []byte) (Mnemonic, error) {
// with our KDF salt appended to it.
cipherText, err := c.encipher(pass)
if err != nil {
return Mnemonic{}, nil
return Mnemonic{}, err
}
// Now that we have our cipher text, we'll convert it into a mnemonic

View File

@ -276,12 +276,12 @@ func readRemoteKeyDesc(r io.Reader) (keychain.KeyDescriptor, error) {
_, err := io.ReadFull(r, pub[:])
if err != nil {
return keyDesc, nil
return keychain.KeyDescriptor{}, err
}
keyDesc.PubKey, err = btcec.ParsePubKey(pub[:], btcec.S256())
if err != nil {
return keyDesc, nil
return keychain.KeyDescriptor{}, err
}
keyDesc.PubKey.Curve = nil

View File

@ -961,7 +961,7 @@ func decodeIncomingResolution(r io.Reader, h *lnwallet.IncomingHtlcResolution) e
func encodeOutgoingResolution(w io.Writer, o *lnwallet.OutgoingHtlcResolution) error {
if err := binary.Write(w, endian, o.Expiry); err != nil {
return nil
return err
}
if o.SignedTimeoutTx == nil {
@ -979,7 +979,7 @@ func encodeOutgoingResolution(w io.Writer, o *lnwallet.OutgoingHtlcResolution) e
}
if err := binary.Write(w, endian, o.CsvDelay); err != nil {
return nil
return err
}
if _, err := w.Write(o.ClaimOutpoint.Hash[:]); err != nil {
return err

View File

@ -9,7 +9,7 @@ import (
"sync/atomic"
"github.com/coreos/bbolt"
"github.com/lightningnetwork/lightning-onion"
sphinx "github.com/lightningnetwork/lightning-onion"
"github.com/lightningnetwork/lnd/chainntnfs"
)
@ -237,7 +237,7 @@ func (d *DecayedLog) gcExpiredHashes(height uint32) (uint32, error) {
return nil
})
if err != nil {
return 0, nil
return 0, err
}
return numExpiredHashes, nil

View File

@ -4461,7 +4461,7 @@ func (r *rpcServer) FeeReport(ctx context.Context,
for {
timeSlice, err := fwdEventLog.Query(query)
if err != nil {
return 0, nil
return 0, err
}
// If the timeslice is empty, then we'll return as

View File

@ -1052,7 +1052,7 @@ func writeTaggedFields(bufferBase32 *bytes.Buffer, invoice *Invoice) error {
pubKeyBase32, err := bech32.ConvertBits(
invoice.Destination.SerializeCompressed(), 8, 5, true)
if err != nil {
return nil
return err
}
if len(pubKeyBase32) != pubKeyBase32Len {