multi: wrap all errors
This commit is contained in:
1 parent
9a28a4c105
commit
648fb22f63
60 files changed
+138
-133
No files matched your search
@@ -1647,7 +1647,7 @@ func (d *AuthenticatedGossiper) retransmitStaleAnns(now time.Time) error {
|
||||
return nil
|
||||
})
|
||||
if err != nil && err != channeldb.ErrGraphNoEdgesFound {
|
||||
return fmt.Errorf("unable to retrieve outgoing channels: %v",
|
||||
return fmt.Errorf("unable to retrieve outgoing channels: %w",
|
||||
err)
|
||||
}
|
||||
|
||||
@@ -1873,7 +1873,7 @@ func (d *AuthenticatedGossiper) processRejectedEdge(
|
||||
// to the database.
|
||||
err = d.cfg.Router.AddProof(chanAnnMsg.ShortChannelID, proof)
|
||||
if err != nil {
|
||||
err := fmt.Errorf("unable add proof to shortChanID=%v: %v",
|
||||
err := fmt.Errorf("unable add proof to shortChanID=%v: %w",
|
||||
chanAnnMsg.ShortChannelID, err)
|
||||
log.Error(err)
|
||||
return nil, err
|
||||
@@ -1910,7 +1910,7 @@ func (d *AuthenticatedGossiper) addNode(msg *lnwire.NodeAnnouncement,
|
||||
op ...batch.SchedulerOption) error {
|
||||
|
||||
if err := routing.ValidateNodeAnn(msg); err != nil {
|
||||
return fmt.Errorf("unable to validate node announcement: %v",
|
||||
return fmt.Errorf("unable to validate node announcement: %w",
|
||||
err)
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ func NewMessageStore(db kvdb.Backend) (*MessageStore, error) {
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to create required buckets: %v",
|
||||
return nil, fmt.Errorf("unable to create required buckets: %w",
|
||||
err)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1252,7 +1252,7 @@ func (g *GossipSyncer) replyShortChanIDs(query *lnwire.QueryShortChanIDs) error
|
||||
query.ChainHash, query.ShortChanIDs,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to fetch chan anns for %v..., %v",
|
||||
return fmt.Errorf("unable to fetch chan anns for %v..., %w",
|
||||
query.ShortChanIDs[0].ToUint64(), err)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user