Skip to content

fix: keep node count on restart, legacy sandbox detection, unit tests - #69

Open
shichengripple001 wants to merge 1 commit into
feat/xrpld-3.4.1from
fix/consensus-node-count-and-tests
Open

shichengripple001 wants to merge 1 commit into
feat/xrpld-3.4.1from
fix/consensus-node-count-and-tests

Conversation

@shichengripple001

Copy link
Copy Markdown
Contributor

Follow-up to #68 (multi-node consensus). Stacked on feat/xrpld-3.4.1: merge #68 first, then retarget this PR to main.

Changes

  • xrpl-up start --local-network without --nodes now reuses the existing sandbox's node count. Before, it always used 3, so a 2-node network restarted as 3 nodes.
  • readConsensusNodeCount falls back to counting node services in the compose file when no record exists (sandboxes created before the record was written), instead of assuming 3. xrpl-up nodes was reporting a phantom validator3 for those.
  • --nodes help text describes the new default.
  • New unit tests (tests/unit/consensus-nodes.test.ts, 9 tests): node-count record/fallback/out-of-range handling and the logs node<N> alias mapping.

Tested

  • npm run build clean; vitest run tests/unit: 14 passed.
  • Live with the xrpl-up CLI: start --local-network --nodes 2, stop, start --local-network (no flag) came back as a 2-node network, both validators proposing.

🤖 Generated with Claude Code

…nit tests

- start --local-network without --nodes now reuses the existing sandbox node count (was always 3)
- readConsensusNodeCount falls back to counting node services in the compose file for sandboxes created before the record existed
- unit tests for readConsensusNodeCount and the logs node<N> alias

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant