graph/db: thread context through FetchChannelEdgesByID
This commit is contained in:
14 files changed
+93
-42
No files matched your search
@@ -454,7 +454,7 @@ func TestChannelUpdateValidation(t *testing.T) {
|
||||
|
||||
// Assert that the initially configured fee is retrieved correctly.
|
||||
_, e1, e2, err := ctx.graph.FetchChannelEdgesByID(
|
||||
lnwire.NewShortChanIDFromInt(1).ToUint64(),
|
||||
t.Context(), lnwire.NewShortChanIDFromInt(1).ToUint64(),
|
||||
)
|
||||
require.NoError(t, err, "cannot retrieve channel")
|
||||
|
||||
@@ -526,7 +526,7 @@ func TestChannelUpdateValidation(t *testing.T) {
|
||||
require.Error(t, err, "expected route to fail with channel update")
|
||||
|
||||
_, e1, e2, err = ctx.graph.FetchChannelEdgesByID(
|
||||
lnwire.NewShortChanIDFromInt(1).ToUint64(),
|
||||
t.Context(), lnwire.NewShortChanIDFromInt(1).ToUint64(),
|
||||
)
|
||||
require.NoError(t, err, "cannot retrieve channel")
|
||||
|
||||
@@ -548,7 +548,7 @@ func TestChannelUpdateValidation(t *testing.T) {
|
||||
// This time a valid signature was supplied and the policy change should
|
||||
// have been applied to the graph.
|
||||
_, e1, e2, err = ctx.graph.FetchChannelEdgesByID(
|
||||
lnwire.NewShortChanIDFromInt(1).ToUint64(),
|
||||
t.Context(), lnwire.NewShortChanIDFromInt(1).ToUint64(),
|
||||
)
|
||||
require.NoError(t, err, "cannot retrieve channel")
|
||||
|
||||
@@ -589,7 +589,7 @@ func TestSendPaymentErrorRepeatedFeeInsufficient(t *testing.T) {
|
||||
// to sophon. We'll obtain this as we'll need to to generate the
|
||||
// FeeInsufficient error that we'll send back.
|
||||
_, _, edgeUpdateToFail, err := ctx.graph.FetchChannelEdgesByID(
|
||||
songokuSophonChanID,
|
||||
t.Context(), songokuSophonChanID,
|
||||
)
|
||||
require.NoError(t, err, "unable to fetch chan id")
|
||||
|
||||
@@ -936,7 +936,9 @@ func TestSendPaymentErrorNonFinalTimeLockErrors(t *testing.T) {
|
||||
chanID := ctx.getChannelIDFromAlias(t, "roasbeef", "songoku")
|
||||
roasbeefSongoku := lnwire.NewShortChanIDFromInt(chanID)
|
||||
|
||||
_, _, edgeUpdateToFail, err := ctx.graph.FetchChannelEdgesByID(chanID)
|
||||
_, _, edgeUpdateToFail, err := ctx.graph.FetchChannelEdgesByID(
|
||||
t.Context(), chanID,
|
||||
)
|
||||
require.NoError(t, err, "unable to fetch chan id")
|
||||
|
||||
errChanUpdate := lnwire.ChannelUpdate1{
|
||||
|
||||
Reference in new issue
Block a user