Skip to content

Commit

Permalink
fix typos in deferrd instances (should be deferred)
Browse files Browse the repository at this point in the history
  • Loading branch information
linh2931 committed Oct 3, 2023
1 parent 51bea7b commit 7b3a7c5
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
14 changes: 7 additions & 7 deletions libraries/testing/include/eosio/testing/tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ namespace eosio { namespace testing {
preactivate_feature_only,
preactivate_feature_and_new_bios,
old_wasm_parser,
full,
full_but_disable_deferrd_trx
full_except_do_not_disable_deferred_trx,
full
};

std::ostream& operator<<(std::ostream& os, setup_policy p);
Expand Down Expand Up @@ -387,7 +387,7 @@ namespace eosio { namespace testing {
void preactivate_protocol_features(const vector<digest_type> feature_digests);
void preactivate_builtin_protocol_features(const std::vector<builtin_protocol_feature_t>& features);
void preactivate_all_builtin_protocol_features();
void preactivate_all_but_disable_deferrd_trx();
void preactivate_all_but_disable_deferred_trx();
void preactivate_all_builtin_protocol_features_common(const std::vector<builtin_protocol_feature_t>& ordered_builtins);

static genesis_state default_genesis() {
Expand Down Expand Up @@ -515,9 +515,9 @@ namespace eosio { namespace testing {
bool validate() { return true; }
};

class tester_no_disable_deferrd_trx : public tester {
class tester_no_disable_deferred_trx : public tester {
public:
tester_no_disable_deferrd_trx(): tester(setup_policy::full_but_disable_deferrd_trx) {
tester_no_disable_deferred_trx(): tester(setup_policy::full_except_do_not_disable_deferred_trx) {
}
};

Expand Down Expand Up @@ -666,9 +666,9 @@ namespace eosio { namespace testing {
bool skip_validate = false;
};

class validating_tester_no_disable_deferrd_trx : public validating_tester {
class validating_tester_no_disable_deferred_trx : public validating_tester {
public:
validating_tester_no_disable_deferrd_trx(): validating_tester({}, nullptr, setup_policy::full_but_disable_deferrd_trx) {
validating_tester_no_disable_deferred_trx(): validating_tester({}, nullptr, setup_policy::full_except_do_not_disable_deferred_trx) {
}
};

Expand Down
6 changes: 3 additions & 3 deletions libraries/testing/tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,14 @@ namespace eosio { namespace testing {
break;
}
case setup_policy::full:
case setup_policy::full_but_disable_deferrd_trx: {
case setup_policy::full_except_do_not_disable_deferred_trx: {
schedule_preactivate_protocol_feature();
produce_block();
set_before_producer_authority_bios_contract();
if( policy == setup_policy::full ) {
preactivate_all_builtin_protocol_features();
} else {
preactivate_all_but_disable_deferrd_trx();
preactivate_all_but_disable_deferred_trx();
}
produce_block();
set_bios_contract();
Expand Down Expand Up @@ -1250,7 +1250,7 @@ namespace eosio { namespace testing {
preactivate_all_builtin_protocol_features_common( ordered_builtins );
}

void base_tester::preactivate_all_but_disable_deferrd_trx() {
void base_tester::preactivate_all_but_disable_deferred_trx() {
std::vector<builtin_protocol_feature_t> ordered_builtins;
for( const auto& f : builtin_protocol_feature_codenames ) {
// Before deferred trxs feature is fully disabled, existing tests involving
Expand Down
10 changes: 5 additions & 5 deletions unittests/api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ BOOST_FIXTURE_TEST_CASE(checktime_grow_memory, validating_tester) { try {
deadline_exception, is_deadline_exception );
} FC_LOG_AND_RETHROW() }

BOOST_FIXTURE_TEST_CASE(checktime_hashing_fail, validating_tester_no_disable_deferrd_trx) { try {
BOOST_FIXTURE_TEST_CASE(checktime_hashing_fail, validating_tester_no_disable_deferred_trx) { try {
produce_blocks(2);
create_account( "testapi"_n );
produce_blocks(10);
Expand Down Expand Up @@ -1362,7 +1362,7 @@ BOOST_FIXTURE_TEST_CASE(checktime_start, validating_tester) try {
/*************************************************************************************
* transaction_tests test case
*************************************************************************************/
BOOST_FIXTURE_TEST_CASE(transaction_tests, validating_tester_no_disable_deferrd_trx) { try {
BOOST_FIXTURE_TEST_CASE(transaction_tests, validating_tester_no_disable_deferred_trx) { try {
produce_blocks(2);
create_account( "testapi"_n );
produce_blocks(100);
Expand Down Expand Up @@ -1574,8 +1574,8 @@ BOOST_AUTO_TEST_CASE(inline_action_objective_limit) { try {

BOOST_AUTO_TEST_CASE(deferred_inline_action_limit) { try {
const uint32_t _4k = 4 * 1024;
tester chain(setup_policy::full_but_disable_deferrd_trx, db_read_mode::HEAD, {_4k + 100});
tester chain2(setup_policy::full_but_disable_deferrd_trx, db_read_mode::HEAD, {_4k + 100});
tester chain(setup_policy::full_except_do_not_disable_deferred_trx, db_read_mode::HEAD, {_4k + 100});
tester chain2(setup_policy::full_except_do_not_disable_deferred_trx, db_read_mode::HEAD, {_4k + 100});
signed_block_ptr block;
for (int n=0; n < 2; ++n) {
block = chain.produce_block();
Expand Down Expand Up @@ -1613,7 +1613,7 @@ BOOST_AUTO_TEST_CASE(deferred_inline_action_limit) { try {

} FC_LOG_AND_RETHROW() }

BOOST_FIXTURE_TEST_CASE(deferred_transaction_tests, validating_tester_no_disable_deferrd_trx) { try {
BOOST_FIXTURE_TEST_CASE(deferred_transaction_tests, validating_tester_no_disable_deferred_trx) { try {
produce_blocks(2);
create_accounts( {"testapi"_n, "testapi2"_n, "alice"_n} );
set_code( "testapi"_n, test_contracts::test_api_wasm() );
Expand Down
4 changes: 2 additions & 2 deletions unittests/currency_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace eosio::chain;
using namespace eosio::testing;
using namespace fc;

class currency_tester : public validating_tester_no_disable_deferrd_trx {
class currency_tester : public validating_tester_no_disable_deferred_trx {
public:

auto push_action(const account_name& signer, const action_name &name, const variant_object &data ) {
Expand Down Expand Up @@ -64,7 +64,7 @@ class currency_tester : public validating_tester_no_disable_deferrd_trx {
}

currency_tester()
:validating_tester_no_disable_deferrd_trx(), abi_ser(json::from_string(test_contracts::eosio_token_abi()).as<abi_def>(), abi_serializer::create_yield_function( abi_serializer_max_time ))
:validating_tester_no_disable_deferred_trx(), abi_ser(json::from_string(test_contracts::eosio_token_abi()).as<abi_def>(), abi_serializer::create_yield_function( abi_serializer_max_time ))
{
create_account( "eosio.token"_n);
set_code( "eosio.token"_n, test_contracts::eosio_token_wasm() );
Expand Down
2 changes: 1 addition & 1 deletion unittests/deep_mind_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct deep_mind_log_fixture

struct deep_mind_tester : deep_mind_log_fixture, validating_tester
{
deep_mind_tester() : validating_tester({}, &deep_mind_logger, setup_policy::full_but_disable_deferrd_trx) {}
deep_mind_tester() : validating_tester({}, &deep_mind_logger, setup_policy::full_except_do_not_disable_deferred_trx) {}
};

namespace {
Expand Down
4 changes: 2 additions & 2 deletions unittests/delay_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ BOOST_AUTO_TEST_CASE( link_delay_link_change_heirarchy_test ) { try {

// test canceldelay action cancelling a delayed transaction
BOOST_AUTO_TEST_CASE( canceldelay_test ) { try {
validating_tester_no_disable_deferrd_trx chain;
validating_tester_no_disable_deferred_trx chain;
chain.produce_block();

const auto& contract_account = account_name("defcontract");
Expand Down Expand Up @@ -1439,7 +1439,7 @@ BOOST_AUTO_TEST_CASE( canceldelay_test ) { try {

// test canceldelay action under different permission levels
BOOST_AUTO_TEST_CASE( canceldelay_test2 ) { try {
validating_tester_no_disable_deferrd_trx chain;
validating_tester_no_disable_deferred_trx chain;
chain.produce_block();

const auto& contract_account = account_name("defcontract");
Expand Down
8 changes: 4 additions & 4 deletions unittests/protocol_feature_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1927,7 +1927,7 @@ BOOST_AUTO_TEST_CASE( set_parameters_packed_test ) { try {
namespace eosio::chain { extern void modify_gto_for_canceldelay_test(controller& control, const transaction_id_type& trx_id) ; }

BOOST_AUTO_TEST_CASE( disable_deferred_trxs_stage_1_no_op_test ) { try {
tester_no_disable_deferrd_trx c;
tester_no_disable_deferred_trx c;

c.produce_block();
c.create_accounts( {"alice"_n, "bob"_n, "test"_n} );
Expand Down Expand Up @@ -2038,7 +2038,7 @@ BOOST_AUTO_TEST_CASE( disable_deferred_trxs_stage_1_no_op_test ) { try {
// verify a deferred transaction can be retired as expired at any time regardless of
// whether its delay_until or expiration have been reached
BOOST_AUTO_TEST_CASE( disable_deferred_trxs_stage_1_retire_test ) { try {
tester_no_disable_deferrd_trx c;
tester_no_disable_deferred_trx c;

c.produce_block();
c.create_accounts( {"alice"_n, "test"_n} );
Expand Down Expand Up @@ -2103,7 +2103,7 @@ BOOST_AUTO_TEST_CASE( disable_deferred_trxs_stage_1_retire_test ) { try {
} FC_LOG_AND_RETHROW() } /// disable_deferred_trxs_stage_1_retire_test

BOOST_AUTO_TEST_CASE( disable_deferred_trxs_stage_2_test ) { try {
tester_no_disable_deferrd_trx c;
tester_no_disable_deferred_trx c;

c.produce_block();
c.create_accounts( {"alice"_n, "bob"_n, "test"_n} );
Expand Down Expand Up @@ -2170,7 +2170,7 @@ BOOST_AUTO_TEST_CASE( disable_deferred_trxs_stage_2_test ) { try {
} FC_LOG_AND_RETHROW() } /// disable_deferred_trxs_stage_2_test

BOOST_AUTO_TEST_CASE( disable_deferred_trxs_stage_2_dependency_test ) { try {
tester_no_disable_deferrd_trx c;
tester_no_disable_deferred_trx c;

c.produce_block();

Expand Down
2 changes: 1 addition & 1 deletion unittests/state_history_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ BOOST_AUTO_TEST_CASE(test_deltas_resources_history) {
}

BOOST_AUTO_TEST_CASE(test_trace_log_with_transaction_extensions) {
tester_no_disable_deferrd_trx c;
tester_no_disable_deferred_trx c;

fc::temp_directory state_history_dir;
eosio::state_history::trace_converter log;
Expand Down

0 comments on commit 7b3a7c5

Please sign in to comment.