Add -reset command to letsgo script #224
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
-resetcommand to theletsgoscript that allows users to reset all node data, including:Usage:
The standalone
-resetcommand includes a confirmation prompt before deletion. When used withtestnetormainnet, the confirmation is skipped since the user explicitly requested the reset.Updates since last revision
./letsgo testnet -resetsyntax to reset data and start the node in one commandreturninstead ofexitso it can be called inline-reset/--resetflags from arguments passed tomxd_node(was causing node to fail with usage error)Review & Testing Checklist for Human
./letsgo testnet -resetworkflow: Verify reset happens after build but before node starts, and node initializes fresh (this was broken before the filtering fix)./build/lib/data- confirm this matches where deployed nodes actually store their data (checkdata_dirin config)*.json,*.dat,*.binpatterns don't accidentally match config files that should be preservedtestnet -reset, confirm that data is deleted without prompting (this is intentional)Recommended Test Plan
./letsgo testnet -resetand verify:./letsgo -resetto verify confirmation prompt still worksNotes
rm -rffor database directories - this is intentional but destructive-reset, not when combined with testnet/mainnetLink to Devin run: https://app.devin.ai/sessions/f0a6357d898e440ea3745d77dfb91d8d
Requested by: Runo (runonetworks@gmail.com) / @AlanRuno