multi: remove kvdb.RTx from ForEachNodeChannel
Since we have not removed all call-sites that make use of this parameter, we can remove it. This helps hide DB-specific details from the interface we will introduce for the graph store.
This commit is contained in:
7 files changed
+18
-20
No files matched your search
@@ -3103,10 +3103,15 @@ func nodeTraversal(tx kvdb.RTx, nodePub []byte, db kvdb.Backend,
|
||||
//
|
||||
// Unknown policies are passed into the callback as nil values.
|
||||
func (c *KVStore) ForEachNodeChannel(nodePub route.Vertex,
|
||||
cb func(kvdb.RTx, *models.ChannelEdgeInfo, *models.ChannelEdgePolicy,
|
||||
cb func(*models.ChannelEdgeInfo, *models.ChannelEdgePolicy,
|
||||
*models.ChannelEdgePolicy) error) error {
|
||||
|
||||
return nodeTraversal(nil, nodePub[:], c.db, cb)
|
||||
return nodeTraversal(nil, nodePub[:], c.db, func(_ kvdb.RTx,
|
||||
info *models.ChannelEdgeInfo, policy,
|
||||
policy2 *models.ChannelEdgePolicy) error {
|
||||
|
||||
return cb(info, policy, policy2)
|
||||
})
|
||||
}
|
||||
|
||||
// ForEachSourceNodeChannel iterates through all channels of the source node,
|
||||
|
||||
Reference in new issue
Block a user