Skip to content

Commit 17f4049

Browse files
committed
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.
1 parent 49a8dc8 commit 17f4049

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/key_io_tests.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ BOOST_AUTO_TEST_CASE(key_io_valid_parse)
7878
BOOST_CHECK_MESSAGE(!privkey.IsValid(), "IsValid pubkey as privkey:" + strTest);
7979
}
8080
}
81+
82+
SelectParams(CBaseChainParams::MAIN);
8183
}
8284

8385
// Goal: check that generated keys match test vectors
@@ -144,6 +146,8 @@ BOOST_AUTO_TEST_CASE(key_io_invalid)
144146
BOOST_CHECK_MESSAGE(!privkey.IsValid(), "IsValid privkey in mainnet:" + strTest);
145147
}
146148
}
149+
150+
SelectParams(CBaseChainParams::MAIN);
147151
}
148152

149153
BOOST_AUTO_TEST_SUITE_END()

0 commit comments

Comments
 (0)