Skip to content

Commit

Permalink
test: set chain to mainnet after testing in key_io_tests
Browse files Browse the repository at this point in the history
Rationale:
    Sadly some other tests depends on the chain being mainnet without actually
    setting it to mainnet themselves. Which leads to weird test suite
    failures.
  • Loading branch information
div72 committed Jun 6, 2024
1 parent 80c7bfe commit 57e5637
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test/key_io_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ BOOST_AUTO_TEST_CASE(key_io_valid_parse)
BOOST_CHECK_MESSAGE(!privkey.IsValid(), "IsValid pubkey as privkey:" + strTest);
}
}

SelectParams(CBaseChainParams::MAIN);
}

// Goal: check that generated keys match test vectors
Expand Down Expand Up @@ -144,6 +146,8 @@ BOOST_AUTO_TEST_CASE(key_io_invalid)
BOOST_CHECK_MESSAGE(!privkey.IsValid(), "IsValid privkey in mainnet:" + strTest);
}
}

SelectParams(CBaseChainParams::MAIN);
}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit 57e5637

Please sign in to comment.