channeldb: return errors in various missed places
This commit is contained in:
1 parent
e2d5825df0
commit
ac617a0d01
4 files changed
+4
-4
No files matched your search
@@ -1870,7 +1870,7 @@ func (c *OpenChannel) CommitmentHeight() (uint64, error) {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, nil
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return height, nil
|
return height, nil
|
||||||
|
|||||||
+1
-1
@@ -2256,7 +2256,7 @@ func (c *ChannelGraph) HasLightningNode(nodePub [33]byte) (time.Time, bool, erro
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return time.Time{}, exists, nil
|
return time.Time{}, exists, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return updateTime, exists, nil
|
return updateTime, exists, nil
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ func (d *DB) AddInvoice(newInvoice *Invoice, paymentHash lntypes.Hash) (
|
|||||||
byteOrder.PutUint32(scratch[:], invoiceNum)
|
byteOrder.PutUint32(scratch[:], invoiceNum)
|
||||||
err := invoiceIndex.Put(numInvoicesKey, scratch[:])
|
err := invoiceIndex.Put(numInvoicesKey, scratch[:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
invoiceNum = byteOrder.Uint32(invoiceCounter)
|
invoiceNum = byteOrder.Uint32(invoiceCounter)
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ func (p *PaymentControl) InitPayment(paymentHash lntypes.Hash,
|
|||||||
return bucket.Delete(paymentFailInfoKey)
|
return bucket.Delete(paymentFailInfoKey)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return updateErr
|
return updateErr
|
||||||
|
|||||||
Reference in new issue
Block a user