Skip to content

fix: add missing default cases in treeId switch statements#21942

Merged
PhilWindle merged 1 commit into
merge-train/spartanfrom
phil/a-858-missing-default-in-switch-on-treeid-in-world_state
Mar 24, 2026
Merged

fix: add missing default cases in treeId switch statements#21942
PhilWindle merged 1 commit into
merge-train/spartanfrom
phil/a-858-missing-default-in-switch-on-treeid-in-world_state

Conversation

@PhilWindle

Copy link
Copy Markdown
Collaborator

Summary

  • Adds missing default: cases to 3 switch statements on treeId in nodejs_module/world_state/world_state.cpp
  • Affected functions: find_leaf_indices, find_sibling_paths, append_leaves
  • Without these, unknown treeId values silently fell through instead of throwing errors

Fixes A-858

Three switch statements in nodejs_module/world_state/world_state.cpp
(find_leaf_indices, find_sibling_paths, append_leaves) were missing
default cases, causing silent failures on unknown treeId values instead
of throwing errors.
@PhilWindle PhilWindle added the ci-barretenberg Run all barretenberg/cpp checks. label Mar 24, 2026
@PhilWindle PhilWindle marked this pull request as ready for review March 24, 2026 11:23
@PhilWindle PhilWindle merged commit f6bea80 into merge-train/spartan Mar 24, 2026
28 checks passed
@PhilWindle PhilWindle deleted the phil/a-858-missing-default-in-switch-on-treeid-in-world_state branch March 24, 2026 15:19
github-merge-queue Bot pushed a commit that referenced this pull request Mar 24, 2026
BEGIN_COMMIT_OVERRIDE
chore: deflake n_tps benchmark for LOW_VALUE_TPS=2 (#21578)
fix(sequencer): use wall-clock timestamp for simulation when pipelining
is disabled (#21888)
fix: disable caching of error responses (300-499) on R2 custom domain
(#21939)
fix: add missing default cases in treeId switch statements (#21942)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-barretenberg Run all barretenberg/cpp checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants