From 57e5637bdae7b32d15ec2d774131c85b63385093 Mon Sep 17 00:00:00 2001 From: div72 <60045611+div72@users.noreply.github.com> Date: Wed, 22 Mar 2023 13:17:20 +0300 Subject: [PATCH] test: set chain to mainnet after testing in key_io_tests 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. --- src/test/key_io_tests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/key_io_tests.cpp b/src/test/key_io_tests.cpp index 5019c4eac9..8300aa04d2 100644 --- a/src/test/key_io_tests.cpp +++ b/src/test/key_io_tests.cpp @@ -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 @@ -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()