Merge pull request #9544 from lightningnetwork/elle-graphCacheBase

graph: move graph cache out of CRUD layer
This commit is contained in:
Oliver Gugger authored and GitHub committed 2025-03-25 07:43:06 -06:00
commit af2f11edff
17 files changed
+5435 -4788

No files matched your search

+5 -5
View File
@@ -341,10 +341,10 @@ func testUpdateChannelPolicy(ht *lntest.HarnessTest) {
// but not the second, as she only allows two updates per day and a day
// has yet to elapse from the previous update.
// assertAliceAndBob is a helper closure which updates Alice's policy
// and asserts that both Alice and Bob have heard and updated the
// updateAndAssertAliceAndBob is a helper closure which updates Alice's
// policy and asserts that both Alice and Bob have heard and updated the
// policy in their graph.
assertAliceAndBob := func(req *lnrpc.PolicyUpdateRequest,
updateAndAssertAliceAndBob := func(req *lnrpc.PolicyUpdateRequest,
expectedPolicy *lnrpc.RoutingPolicy) {
alice.RPC.UpdateChannelPolicy(req)
@@ -384,7 +384,7 @@ func testUpdateChannelPolicy(ht *lntest.HarnessTest) {
expectedPolicy.FeeBaseMsat = baseFee1
req.BaseFeeMsat = baseFee1
req.InboundFee = nil
assertAliceAndBob(req, expectedPolicy)
updateAndAssertAliceAndBob(req, expectedPolicy)
// Check that Carol has both heard the policy and updated it in her
// graph.
@@ -407,7 +407,7 @@ func testUpdateChannelPolicy(ht *lntest.HarnessTest) {
baseFee2 := baseFee1 * 2
expectedPolicy.FeeBaseMsat = baseFee2
req.BaseFeeMsat = baseFee2
assertAliceAndBob(req, expectedPolicy)
updateAndAssertAliceAndBob(req, expectedPolicy)
// Since Carol didn't receive the last update, she still has Alice's
// old policy. We validate this by checking the base fee is the older