Problem
The fixture recorder does not capture the NETWORK_ID value from Config when recording env and env_reset steps. This means fixtures for tests that change the network ID mid-test (like NetworkID_test.cpp) produce env configs missing the network_id field.
Example
NetworkID_test.cpp creates three separate Env objects with different network IDs:
test::jtx::Env env{*this, makeNetworkConfig(0)}; // block 1
test::jtx::Env env{*this, makeNetworkConfig(1024)}; // block 2
test::jtx::Env env{*this, makeNetworkConfig(1025)}; // block 3
The recorder captures env_reset steps for blocks 2 and 3 with amendments_enabled, base_fee, reserve_base, reserve_increment — but NOT network_id. This causes conformance consumers to default to network_id=0 for all blocks.
Impact
Without network_id in the fixture, block 3 (networkID=1025) transactions fail with telNETWORK_ID_MAKES_TX_NON_CANONICAL instead of the expected tesSUCCESS or telWRONG_NETWORK, because the consuming test environment doesn't know to set networkID=1025.
Fix
The FixtureRecorder should include network_id in the env config JSON when recording:
- The initial
env section (from the Env constructor)
- Any
env_reset steps (when a new Env is created mid-test)
{
"env": {
"amendments_enabled": [...],
"base_fee": 10,
"reserve_base": 200000000,
"reserve_increment": 50000000,
"network_id": 1025
}
}
The field can be omitted when network_id is 0 (mainnet default) to keep existing fixtures unchanged.
Problem
The fixture recorder does not capture the
NETWORK_IDvalue fromConfigwhen recordingenvandenv_resetsteps. This means fixtures for tests that change the network ID mid-test (likeNetworkID_test.cpp) produce env configs missing thenetwork_idfield.Example
NetworkID_test.cppcreates three separateEnvobjects with different network IDs:test::jtx::Env env{*this, makeNetworkConfig(0)}; // block 1 test::jtx::Env env{*this, makeNetworkConfig(1024)}; // block 2 test::jtx::Env env{*this, makeNetworkConfig(1025)}; // block 3The recorder captures
env_resetsteps for blocks 2 and 3 withamendments_enabled,base_fee,reserve_base,reserve_increment— but NOTnetwork_id. This causes conformance consumers to default tonetwork_id=0for all blocks.Impact
Without
network_idin the fixture, block 3 (networkID=1025) transactions fail withtelNETWORK_ID_MAKES_TX_NON_CANONICALinstead of the expectedtesSUCCESSortelWRONG_NETWORK, because the consuming test environment doesn't know to set networkID=1025.Fix
The
FixtureRecordershould includenetwork_idin the env config JSON when recording:envsection (from theEnvconstructor)env_resetsteps (when a newEnvis created mid-test){ "env": { "amendments_enabled": [...], "base_fee": 10, "reserve_base": 200000000, "reserve_increment": 50000000, "network_id": 1025 } }The field can be omitted when
network_idis 0 (mainnet default) to keep existing fixtures unchanged.