graph/db: thread context to AddChannelEdge
This commit is contained in:
16 files changed
+94
-85
No files matched your search
@@ -2808,7 +2808,7 @@ func (d *AuthenticatedGossiper) handleChanAnnouncement(ctx context.Context,
|
||||
// We will add the edge to the channel router. If the nodes present in
|
||||
// this channel are not present in the database, a partial node will be
|
||||
// added to represent each node while we wait for a node announcement.
|
||||
err = d.cfg.Graph.AddEdge(edge, ops...)
|
||||
err = d.cfg.Graph.AddEdge(ctx, edge, ops...)
|
||||
if err != nil {
|
||||
log.Debugf("Graph rejected edge for short_chan_id(%v): %v",
|
||||
scid.ToUint64(), err)
|
||||
|
||||
@@ -136,8 +136,8 @@ func (r *mockGraphSource) IsZombieEdge(chanID lnwire.ShortChannelID) (bool,
|
||||
return ok, nil
|
||||
}
|
||||
|
||||
func (r *mockGraphSource) AddEdge(info *models.ChannelEdgeInfo,
|
||||
_ ...batch.SchedulerOption) error {
|
||||
func (r *mockGraphSource) AddEdge(_ context.Context,
|
||||
info *models.ChannelEdgeInfo, _ ...batch.SchedulerOption) error {
|
||||
|
||||
r.mu.Lock()
|
||||
defer r.mu.Unlock()
|
||||
|
||||
Reference in new issue
Block a user