multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using non-wrapping format verbs.
This commit is contained in:
103 files changed
+426
-390
No files matched your search
@@ -65,7 +65,7 @@ func findHistoricalChannels(historicalBucket kvdb.RBucket) ([]*OpenChannel,
|
||||
chanPointBuf := bytes.NewBuffer(cp)
|
||||
err := mig.ReadOutpoint(chanPointBuf, &c.FundingOutpoint)
|
||||
if err != nil {
|
||||
return fmt.Errorf("read funding outpoint got: %v", err)
|
||||
return fmt.Errorf("read funding outpoint got: %w", err)
|
||||
}
|
||||
|
||||
// Read the sub-bucket.
|
||||
@@ -141,7 +141,7 @@ func migrateBalances(rootBucket kvdb.RwBucket, c *OpenChannel) error {
|
||||
|
||||
// Update the channel info.
|
||||
if err := PutChanInfo(chanBucket, c, false); err != nil {
|
||||
return fmt.Errorf("unable to put chan info: %v", err)
|
||||
return fmt.Errorf("unable to put chan info: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user