Skip to content

[CT-81] network module has no test for a testnet/mainnet configuration mismatch #1205

Description

@mftee

Overview

contract/src/module/network/mod.rs (179 lines) selects the Stellar network, but there's no evident startup-time check that the configured Horizon URL actually matches the declared network (e.g. STELLAR_NETWORK=mainnet pointed at a testnet Horizon URL) — this is exactly the class of misconfiguration that silently anchors documents on the wrong network.

Tasks

  • Add a startup check that verifies the Horizon URL's network matches the declared STELLAR_NETWORK
  • Fail startup with a clear error on mismatch
  • Add a test for a deliberately mismatched configuration

Acceptance Criteria

  • Starting the service with a mismatched network/Horizon-URL combination fails fast with a clear error

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontract

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions