Skip to content

Conversation

@TheBlueMatt
Copy link
Contributor

When we were only generating snapshots that contained parts of the network graph, extracting the chain hash from the network graph announcements themselves was fine. However, now that we also serialize empty snapshots as a "no changes since your last sync" file, we need to initialize the chain_hash to the real network.

Luckily, config::network() already exists to make this easy, so we simply switch to that.

Fixes #92

When we were only generating snapshots that contained parts of the
network graph, extracting the chain hash from the network graph
announcements themselves was fine. However, now that we also
serialize empty snapshots as a "no changes since your last sync"
file, we need to initialize the chain_hash to the real network.

Luckily, `config::network()` already exists to make this easy, so
we simply switch to that.

Fixes lightningdevkit#92
@TheBlueMatt TheBlueMatt merged commit 8493c61 into lightningdevkit:main Apr 17, 2025
4 checks passed
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.

Initial snapshot for regtest has bitcoin chain hash

1 participant