Skip to content

[test] fork_profile_parses_and_targets_localhost missing chain_id, metrics bind, profit gate asserts #256

@obchain

Description

@obchain

Refs #52

File: crates/charon-core/tests/config_profiles.rs

Problem

Test verifies fork.toml parses + rpc targets localhost. Does NOT assert:

  • chain_id = 56
  • metrics.bind = 127.0.0.1:9091
  • bot.min_profit_usd < default (the intentional lowering)
  • presence of required Venus addresses

Silent drift in any of these fields passes the test.

Fix

Add assertions:

assert_eq!(cfg.chain.bnb.chain_id, 56);
assert_eq!(cfg.metrics.bind, "127.0.0.1:9091");
assert!(cfg.bot.min_profit_usd < 5.0);
assert_eq!(cfg.protocol.venus.comptroller, address!("fd36e2c2a6789db23113685031d7f16329158384"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    layer:rustRust crates (core / scanner / protocols / executor / cli)pr-reviewFindings from PR review processpriority:p2-polishNice-to-have / polishstatus:readyScoped and ready to pick uptype:testTests, fuzz, fork, integration

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions