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

Request DB reset when dev/test/sim network restart is detected #331

Merged
merged 7 commits into from
Nov 28, 2023

Conversation

coderofstuff
Copy link
Collaborator

@coderofstuff coderofstuff commented Nov 22, 2023

This detects if the current Genesis (as defined in code) is in the local active consensus DB - which it always should be. If it isn't, then the network has restarted and the local DB must be deleted. Only applied to non-mainnet networks as mainnet is never retarted.

kaspad/src/daemon.rs Outdated Show resolved Hide resolved
kaspad/src/daemon.rs Outdated Show resolved Hide resolved
kaspad/src/daemon.rs Outdated Show resolved Hide resolved
@coderofstuff coderofstuff changed the title Request DB reset when TN11 restart is detected Request DB reset when network restart is detected Nov 24, 2023
@coderofstuff coderofstuff changed the title Request DB reset when network restart is detected Request DB reset when dev/test/sim network restart is detected Nov 24, 2023
@someone235 someone235 merged commit 55c214b into kaspanet:master Nov 28, 2023
@coderofstuff coderofstuff deleted the tn11-restarted-check branch January 27, 2024 08:31
smartgoo pushed a commit to smartgoo/rusty-kaspa that referenced this pull request Jun 18, 2024
…net#331)

* Request DB reset when TN11 restart is detected

* Use headers store directly

* Check DB reset on all non-mainnet restart

* Lint fixes

* Gather reset conditions to ensure single reset

* Use info for reset logging

---------

Co-authored-by: Ori Newman <[email protected]>
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