graph/db+server: let ForEachSourceNodeChannel take a context
This commit is contained in:
5 files changed
+13
-12
No files matched your search
@@ -724,10 +724,9 @@ func (s *SQLStore) updateEdgeCache(e *models.ChannelEdgePolicy,
|
||||
// peer's node information.
|
||||
//
|
||||
// NOTE: part of the V1Store interface.
|
||||
func (s *SQLStore) ForEachSourceNodeChannel(cb func(chanPoint wire.OutPoint,
|
||||
havePolicy bool, otherNode *models.LightningNode) error) error {
|
||||
|
||||
var ctx = context.TODO()
|
||||
func (s *SQLStore) ForEachSourceNodeChannel(ctx context.Context,
|
||||
cb func(chanPoint wire.OutPoint, havePolicy bool,
|
||||
otherNode *models.LightningNode) error) error {
|
||||
|
||||
return s.db.ExecTx(ctx, sqldb.ReadTxOpt(), func(db SQLQueries) error {
|
||||
nodeID, nodePub, err := s.getSourceNode(ctx, db, ProtocolV1)
|
||||
|
||||
Reference in new issue
Block a user