Skip to content

Commit 0a760f3

Browse files
UdjinM6Munkybooty
authored andcommitted
fix 15988
NOTE: the hash is different because the error message is different for us: "Only one of -regtest, -testnet or -devnet can be used."
1 parent 1b279f5 commit 0a760f3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/test/util_tests.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,8 @@ BOOST_FIXTURE_TEST_CASE(util_ChainMerge, ChainMergeTestingSetup)
891891
ForEachMergeSetup([&](const ActionList& arg_actions, const ActionList& conf_actions) {
892892
TestArgsManager parser;
893893
LOCK(parser.cs_args);
894-
parser.AddArg("-regtest", "regtest", false, OptionsCategory::OPTIONS);
895-
parser.AddArg("-testnet", "testnet", false, OptionsCategory::OPTIONS);
894+
parser.AddArg("-regtest", "regtest", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
895+
parser.AddArg("-testnet", "testnet", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
896896

897897
auto arg = [](Action action) { return action == ENABLE_TEST ? "-testnet=1" :
898898
action == DISABLE_TEST ? "-testnet=0" :
@@ -935,7 +935,7 @@ BOOST_FIXTURE_TEST_CASE(util_ChainMerge, ChainMergeTestingSetup)
935935
}
936936
desc += "\n";
937937

938-
out_sha.Write((const unsigned char*)desc.data(), desc.size());
938+
out_sha.Write(MakeUCharSpan(desc));
939939
if (out_file) {
940940
BOOST_REQUIRE(fwrite(desc.data(), 1, desc.size(), out_file) == desc.size());
941941
}
@@ -948,18 +948,18 @@ BOOST_FIXTURE_TEST_CASE(util_ChainMerge, ChainMergeTestingSetup)
948948

949949
unsigned char out_sha_bytes[CSHA256::OUTPUT_SIZE];
950950
out_sha.Finalize(out_sha_bytes);
951-
std::string out_sha_hex = HexStr(std::begin(out_sha_bytes), std::end(out_sha_bytes));
951+
std::string out_sha_hex = HexStr(out_sha_bytes);
952952

953953
// If check below fails, should manually dump the results with:
954954
//
955-
// CHAIN_MERGE_TEST_OUT=results.txt ./test_bitcoin --run_test=util_tests/util_ChainMerge
955+
// CHAIN_MERGE_TEST_OUT=results.txt ./test_dash --run_test=util_tests/util_ChainMerge
956956
//
957957
// And verify diff against previous results to make sure the changes are expected.
958958
//
959959
// Results file is formatted like:
960960
//
961961
// <input> || <output>
962-
BOOST_CHECK_EQUAL(out_sha_hex, "b284f4b4a15dd6bf8c06213a69a004b1960388e1d9917173927db52ac220927f");
962+
BOOST_CHECK_EQUAL(out_sha_hex, "3e70723862e346ed6e9b48d8efa13d4d56334c0b73fbf3c3a6ac8b8f4d914f65");
963963
}
964964

965965
BOOST_AUTO_TEST_CASE(util_FormatMoney)

0 commit comments

Comments
 (0)