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
@@ -1141,7 +1141,7 @@ func TestGraphTraversal(t *testing.T) {
|
||||
numNodeChans := 0
|
||||
firstNode, secondNode := nodeList[0], nodeList[1]
|
||||
err = graph.ForEachNodeChannel(firstNode.PubKeyBytes,
|
||||
func(_ kvdb.RTx, _ *models.ChannelEdgeInfo, outEdge,
|
||||
func(_ *models.ChannelEdgeInfo, outEdge,
|
||||
inEdge *models.ChannelEdgePolicy) error {
|
||||
|
||||
// All channels between first and second node should
|
||||
@@ -2882,7 +2882,7 @@ func TestIncompleteChannelPolicies(t *testing.T) {
|
||||
|
||||
calls := 0
|
||||
err := graph.ForEachNodeChannel(node.PubKeyBytes,
|
||||
func(_ kvdb.RTx, _ *models.ChannelEdgeInfo, outEdge,
|
||||
func(_ *models.ChannelEdgeInfo, outEdge,
|
||||
inEdge *models.ChannelEdgePolicy) error {
|
||||
|
||||
if !expectedOut && outEdge != nil {
|
||||
@@ -4001,8 +4001,7 @@ func BenchmarkForEachChannel(b *testing.B) {
|
||||
require.NoError(b, err)
|
||||
|
||||
for _, n := range nodes {
|
||||
cb := func(tx kvdb.RTx,
|
||||
info *models.ChannelEdgeInfo,
|
||||
cb := func(info *models.ChannelEdgeInfo,
|
||||
policy *models.ChannelEdgePolicy,
|
||||
policy2 *models.ChannelEdgePolicy) error { //nolint:ll
|
||||
|
||||
|
||||
Reference in new issue
Block a user