Skip to content

Commit

Permalink
TSH Tests (XRPLF#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
dangell7 authored Dec 3, 2023
1 parent 7881b7f commit 27f43ba
Show file tree
Hide file tree
Showing 8 changed files with 5,099 additions and 403 deletions.
2 changes: 2 additions & 0 deletions Builds/CMake/RippledCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ if (tests)
src/test/app/ValidatorList_test.cpp
src/test/app/ValidatorSite_test.cpp
src/test/app/SetHook_test.cpp
src/test/app/SetHookTSH_test.cpp
src/test/app/Wildcard_test.cpp
src/test/app/XahauGenesis_test.cpp
src/test/app/tx/apply_test.cpp
Expand Down Expand Up @@ -896,6 +897,7 @@ if (tests)
src/test/jtx/impl/token.cpp
src/test/jtx/impl/trust.cpp
src/test/jtx/impl/txflags.cpp
src/test/jtx/impl/unl.cpp
src/test/jtx/impl/uritoken.cpp
src/test/jtx/impl/utility.cpp

Expand Down
67 changes: 0 additions & 67 deletions src/test/app/Import_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5549,73 +5549,6 @@ class Import_test : public beast::unit_test::suite
}
}

// std::unique_ptr<Config>
// network::makeGenesisConfig(
// FeatureBitset features,
// uint32_t networkID,
// std::string fee,
// std::string a_res,
// std::string o_res,
// uint32_t ledgerID)
// {
// using namespace jtx;

// // IMPORT VL KEY
// std::vector<std::string> const keys = {
// "ED74D4036C6591A4BDF9C54CEFA39B996A"
// "5DCE5F86D11FDA1874481CE9D5A1CDC1"};

// Json::Value jsonValue;
// Json::Reader reader;
// reader.parse(ImportTCHalving::base_genesis, jsonValue);

// foreachFeature(features, [&](uint256 const& feature) {
// std::string featureName = featureToName(feature);
// std::optional<uint256> featureHash =
// getRegisteredFeature(featureName);
// if (featureHash.has_value())
// {
// std::string hashString = to_string(featureHash.value());
// jsonValue["ledger"]["accountState"][1]["Amendments"].append(
// hashString);
// }
// });

// jsonValue["ledger_current_index"] = ledgerID;
// jsonValue["ledger"]["ledger_index"] = to_string(ledgerID);
// jsonValue["ledger"]["seqNum"] = to_string(ledgerID);

// return envconfig([&](std::unique_ptr<Config> cfg) {
// cfg->NETWORK_ID = networkID;
// cfg->START_LEDGER = jsonValue.toStyledString();
// cfg->START_UP = Config::LOAD_JSON;
// Section config;
// config.append(
// {"reference_fee = " + fee,
// "account_reserve = " + a_res,
// "owner_reserve = " + o_res});
// auto setup = setup_FeeVote(config);
// cfg->FEES = setup;

// for (auto const& strPk : keys)
// {
// auto pkHex = strUnHex(strPk);
// if (!pkHex)
// Throw<std::runtime_error>(
// "Import VL Key '" + strPk + "' was not valid hex.");

// auto const pkType = publicKeyType(makeSlice(*pkHex));
// if (!pkType)
// Throw<std::runtime_error>(
// "Import VL Key '" + strPk +
// "' was not a valid key type.");

// cfg->IMPORT_VL_KEYS.emplace(strPk, makeSlice(*pkHex));
// }
// return cfg;
// });
// }

void
testHalving(FeatureBitset features)
{
Expand Down
Loading

0 comments on commit 27f43ba

Please sign in to comment.