Skip to content

Don't load network graph twice on start-up#3290

Merged
t-bast merged 1 commit intomasterfrom
use-network-db-checker
Apr 15, 2026
Merged

Don't load network graph twice on start-up#3290
t-bast merged 1 commit intomasterfrom
use-network-db-checker

Conversation

@t-bast
Copy link
Copy Markdown
Member

@t-bast t-bast commented Apr 15, 2026

We previously read the whole network graph from DB (channels and nodes) twice: once before starting any actor to verify that the DB has not been corrupted, and then again when initializing the Router actor.

We now keep the result of the first DB read instead of throwing it away and provide it as argument to the Router, which doesn't need to read from the DB on start-up anymore.

@t-bast t-bast requested a review from pm47 April 15, 2026 14:04
Comment thread eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala Outdated
We previously read the whole network graph from DB (channels and nodes)
twice: once before starting any actor to verify that the DB has not been
corrupted, and then again when initializing the `Router` actor.

We now keep the result of the first DB read instead of throwing it away
and provide it as argument to the `Router`, which doesn't need to read
from the DB on start-up anymore.
@t-bast t-bast force-pushed the use-network-db-checker branch from 111738b to f5ad284 Compare April 15, 2026 15:18
@t-bast t-bast merged commit 0211d67 into master Apr 15, 2026
1 check passed
@t-bast t-bast deleted the use-network-db-checker branch April 15, 2026 15:51
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