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

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

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

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

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

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

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