Skip to content

Handle ElementsRegtest in test context instead of panicking#35

Merged
Arvolear merged 1 commit intoBlockstreamResearch:devfrom
panditdhamdhere:fix-elementsregtest-handling
Mar 24, 2026
Merged

Handle ElementsRegtest in test context instead of panicking#35
Arvolear merged 1 commit intoBlockstreamResearch:devfrom
panditdhamdhere:fix-elementsregtest-handling

Conversation

@panditdhamdhere
Copy link

Summary

Previously, using ElementsRegtest as the network in the test config (esplora-only mode) caused a panic with "Impossible branch reached". Invalid network values (e.g. typos) also panicked instead of returning a clear error.

Changes

  • Add ElementsRegtest case to network match (maps to default_regtest())

  • Return BadNetworkName error for invalid network values instead of panic

  • Add unit test for invalid network error handling

  • Align error message with CLI config validation

  • This PR suggests a bug fix and I've added the necessary tests.

- Add ElementsRegtest case to network match (maps to default_regtest())
- Return BadNetworkName error for invalid network values instead of panic
- Add unit test for invalid network error handling
- Align error message with CLI config validation

Made-with: Cursor
@panditdhamdhere panditdhamdhere force-pushed the fix-elementsregtest-handling branch from 3a2e1c8 to a664963 Compare March 23, 2026 20:30
@Arvolear Arvolear changed the base branch from master to dev March 24, 2026 13:03
Copy link
Collaborator

@Arvolear Arvolear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing. Thank you for taking a look, man.

ACK a664963.

@Arvolear Arvolear merged commit cd13775 into BlockstreamResearch:dev Mar 24, 2026
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