Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grpc graph share #156

Closed
wants to merge 36 commits into from
Closed

Grpc graph share #156

wants to merge 36 commits into from

Conversation

ellemouton
Copy link
Owner

No description provided.

Copy link

github-actions bot commented Nov 7, 2024

Pull reviewers stats

Stats of the last 30 days for lnd:

User Total reviews Time to review Total comments

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11719458899

Details

  • 616 of 1716 (35.9%) changed or added relevant lines in 61 files are covered.
  • 24786 unchanged lines in 424 files lost coverage.
  • Overall coverage decreased (-9.0%) to 49.771%

Changes Missing Coverage Covered Lines Changed/Added Lines %
chainreg/no_chain_backend.go 0 1 0.0%
lnrpc/devrpc/dev_server.go 0 1 0.0%
lnrpc/invoicesrpc/addinvoice.go 6 7 85.71%
pilot.go 0 1 0.0%
routing/localchans/manager.go 4 5 80.0%
chanbackup/backup.go 5 7 71.43%
channeldb/codec.go 4 6 66.67%
peer/brontide.go 4 6 66.67%
contractcourt/nursery_store.go 10 13 76.92%
feature/manager.go 1 4 25.0%
Files with Coverage Reduction New Missed Lines %
server.go 1 63.69%
graph/errors.go 1 94.74%
lnwire/typed_fee.go 2 66.67%
htlcswitch/linkfailure.go 2 58.62%
channeldb/forwarding_policy.go 2 85.14%
record/hop.go 2 93.33%
rpcperms/interceptor.go 2 82.59%
lnwire/short_channel_id.go 2 89.74%
lnwallet/sigpool.go 2 65.63%
log.go 2 96.69%
Totals Coverage Status
Change from base Build 11719456679: -9.0%
Covered Lines: 99537
Relevant Lines: 199989

💛 - Coveralls

@ellemouton ellemouton changed the base branch from master to moveGraphDBCode November 7, 2024 17:21
@ellemouton ellemouton force-pushed the moveGraphDBCode branch 2 times, most recently from a066df1 to e017ccf Compare November 8, 2024 09:23
This struct is only used by tests, so move it to a test file.
So that we can stop depending on kvdb.RTx directly. The implementation
of this is currently just a kvdb.RTx but eventually this could be a SQL
transaction or even multiple transactions for the case where the query
is being sent to both a local and remote db.
Let ForEachNodeChannel always take the new graphdb.RTx.
Let FetchLightningNode take the new abstract graphdb.RTx and use this
method everwhere.
In this commit, we defined a new `autopilot.GraphSource` interface which
describes what the backing graph source for the autopilot agent needs to
implement. Various methods that need the direct graph db pointer are
moved to test files since these methods are only used in tests to
populate the test graph.
Define a new GraphSource interface required by the invoicerpc server and
remove its access to the graphdb.ChannelGraph pointer.
Since this will be used to create any read transaction that can be used
with other graph read calls (ie, not limited to path finding).
For any method that takes a call-back which takes a read transaction, it
makese sense for the method itself to also take an optional read transaction.
Most call-sites of this method have a read transaction available to pass
in. Note that this also means that calls to FetchNodeFeatures made from
the router are made under the same read transaction as calls to
ForEachNodeDirectedChannel which makes things cleaner.
When set, LND will not advertise the gossip queries feature bit and it
will not initiate gossip syncing with any peer.
This is an interface that the LND can provide to other callers systems
in the same process.
@ellemouton ellemouton closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants