Skip to content

Validate network name in test config #34

@panditdhamdhere

Description

@panditdhamdhere

Summary

Add validation for the network field in the test configuration so invalid values are caught early instead of causing confusing runtime errors.

Background

There is a TODO in crates/test/src/config.rs (line 46) noting that network name validation should be implemented.

Current behavior

The [test.esplora] section accepts a network field. According to the README, valid values are: Liquid, LiquidTestnet, ElementsRegtest. Invalid or misspelled values may not be rejected until later, making debugging harder.

Proposed solution

Validate the network field when loading the config and return a clear error if the value is not one of the allowed options.

Files involved

  • crates/test/src/config.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions