From fe93c3dc955cb200c11eaf247e98975fcccabcd7 Mon Sep 17 00:00:00 2001 From: James-Mart Date: Tue, 1 Feb 2022 22:28:30 +0000 Subject: [PATCH] Use eosio/authority.hpp rather than tester equivalent --- libraries/eosiolib/tester/tester.cpp | 40 +++------------------------- 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/libraries/eosiolib/tester/tester.cpp b/libraries/eosiolib/tester/tester.cpp index d136cd810..6f6b95636 100644 --- a/libraries/eosiolib/tester/tester.cpp +++ b/libraries/eosiolib/tester/tester.cpp @@ -1,6 +1,7 @@ #include #include #include +#include namespace { @@ -91,39 +92,6 @@ eosio::asset eosio::string_to_asset(const char* s) return eosio::convert_from_string(s); } -namespace -{ - // TODO: move - struct tester_permission_level_weight - { - eosio::permission_level permission = {}; - uint16_t weight = {}; - }; - - EOSIO_REFLECT(tester_permission_level_weight, permission, weight); - - // TODO: move - struct tester_wait_weight - { - uint32_t wait_sec = {}; - uint16_t weight = {}; - }; - - EOSIO_REFLECT(tester_wait_weight, wait_sec, weight); - - // TODO: move - struct tester_authority - { - uint32_t threshold = {}; - std::vector keys = {}; - std::vector accounts = {}; - std::vector waits = {}; - }; - - EOSIO_REFLECT(tester_authority, threshold, keys, accounts, waits); - -} // namespace - /** * Validates the status of a transaction. If expected_except is nullptr, then the * transaction should succeed. Otherwise it represents a string which should be @@ -442,7 +410,7 @@ eosio::transaction_trace eosio::test_chain::create_account(name ac, const public_key& pub_key, const char* expected_except) { - tester_authority simple_auth{ + authority simple_auth{ .threshold = 1, .keys = {{pub_key, 1}}, }; @@ -463,11 +431,11 @@ eosio::transaction_trace eosio::test_chain::create_code_account(name account, bool is_priv, const char* expected_except) { - tester_authority simple_auth{ + authority simple_auth{ .threshold = 1, .keys = {{pub_key, 1}}, }; - tester_authority code_auth{ + authority code_auth{ .threshold = 1, .keys = {{pub_key, 1}}, .accounts = {{{account, "eosio.code"_n}, 1}},