From 9d1db120417602b733d32f6f8779c549d20a1935 Mon Sep 17 00:00:00 2001 From: satyakoneru <15652887+satyakoneru@users.noreply.github.com> Date: Wed, 1 Apr 2020 04:04:46 +0000 Subject: [PATCH] Revert SON HF related checks and tests --- libraries/chain/account_evaluator.cpp | 5 ----- libraries/chain/asset_evaluator.cpp | 5 ----- tests/tests/affiliate_tests.cpp | 10 +++++----- tests/tests/history_api_tests.cpp | 6 +++--- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/libraries/chain/account_evaluator.cpp b/libraries/chain/account_evaluator.cpp index 5a945059..ad6ac5dc 100644 --- a/libraries/chain/account_evaluator.cpp +++ b/libraries/chain/account_evaluator.cpp @@ -111,11 +111,6 @@ void_result account_create_evaluator::do_evaluate( const account_create_operatio if( d.head_block_time() < HARDFORK_999_TIME ) FC_ASSERT( !op.extensions.value.affiliate_distributions.valid(), "Affiliate reward distributions not allowed yet" ); - if( d.head_block_time() < HARDFORK_SON_TIME ) - { - FC_ASSERT( op.name != "son-account", "Preventive check to not allow son-account before SON HF" ); - } - FC_ASSERT( fee_paying_account->is_lifetime_member(), "Only Lifetime members may register an account." ); FC_ASSERT( op.referrer(d).is_member(d.head_block_time()), "The referrer must be either a lifetime or annual subscriber." ); diff --git a/libraries/chain/asset_evaluator.cpp b/libraries/chain/asset_evaluator.cpp index c9c2664d..7a26a2cb 100644 --- a/libraries/chain/asset_evaluator.cpp +++ b/libraries/chain/asset_evaluator.cpp @@ -95,11 +95,6 @@ void_result asset_create_evaluator::do_evaluate( const asset_create_operation& o wlog( "Asset ${s} has a name which requires hardfork 385", ("s",op.symbol) ); } - if( d.head_block_time() < HARDFORK_SON_TIME ) - { - FC_ASSERT( op.symbol != "BTC", "Preventive check to not allow BTC asset before SON HF" ); - } - // core_fee_paid -= core_fee_paid.value/2; if( op.bitasset_opts ) diff --git a/tests/tests/affiliate_tests.cpp b/tests/tests/affiliate_tests.cpp index 6b8f8fbe..72482a0a 100644 --- a/tests/tests/affiliate_tests.cpp +++ b/tests/tests/affiliate_tests.cpp @@ -289,7 +289,7 @@ BOOST_AUTO_TEST_CASE( affiliate_payout_helper_test ) { ACTORS( (irene) ); - const asset_id_type btc_id = create_user_issued_asset( "BTCT", irene, 0 ).id; + const asset_id_type btc_id = create_user_issued_asset( "BTC", irene, 0 ).id; issue_uia( irene, asset( 100000, btc_id ) ); affiliate_test_helper ath( *this ); @@ -517,7 +517,7 @@ BOOST_AUTO_TEST_CASE( bookie_payout_test ) { try { ACTORS( (irene) ); - const asset_id_type btc_id = create_user_issued_asset( "BTCT", irene, 0 ).id; + const asset_id_type btc_id = create_user_issued_asset( "BTC", irene, 0 ).id; affiliate_test_helper ath( *this ); @@ -616,7 +616,7 @@ BOOST_AUTO_TEST_CASE( statistics_test ) INVOKE(bookie_payout_test); - const asset_id_type btc_id = get_asset( "BTCT" ).id; + const asset_id_type btc_id = get_asset( "BTC" ).id; transfer( ath.alice_id, ath.ann_id, asset( 100, btc_id ), asset(0) ); transfer( ath.alice_id, ath.audrey_id, asset( 100, btc_id ), asset(0) ); @@ -625,12 +625,12 @@ BOOST_AUTO_TEST_CASE( statistics_test ) { const auto& idx = db.get_index_type().indices().get(); - BOOST_CHECK_EQUAL( 2, idx.size() ); // penny 216+60 CORE, paula 600 BTCT + BOOST_CHECK_EQUAL( 2, idx.size() ); // penny 216+60 CORE, paula 600 BTC } { const auto& idx = db.get_index_type().indices().get(); - BOOST_CHECK_EQUAL( 3, idx.size() ); // rps 216 CORE, bookie 60 CORE + 600 BTCT + BOOST_CHECK_EQUAL( 3, idx.size() ); // rps 216 CORE, bookie 60 CORE + 600 BTC } graphene::affiliate_stats::affiliate_stats_api stats( app ); diff --git a/tests/tests/history_api_tests.cpp b/tests/tests/history_api_tests.cpp index 9c5b7a42..943b8265 100644 --- a/tests/tests/history_api_tests.cpp +++ b/tests/tests/history_api_tests.cpp @@ -120,7 +120,7 @@ BOOST_AUTO_TEST_CASE(get_account_history_additional) { const account_object& dan = create_account("dan"); // create op 1 create_bitasset("CNY", dan.id); // create op 2 - create_bitasset("BTCT", account_id_type()); // create op 3 + create_bitasset("BTC", account_id_type()); // create op 3 create_bitasset("XMR", dan.id); // create op 4 create_bitasset("EUR", account_id_type()); // create op 5 create_bitasset("OIL", dan.id); // create op 6 @@ -454,7 +454,7 @@ BOOST_AUTO_TEST_CASE(track_account) { BOOST_CHECK_EQUAL(histories[1].id.instance(), 3u); // create more ops, starting with an untracked account - create_bitasset( "BTCT", account_id_type() ); + create_bitasset( "BTC", account_id_type() ); create_bitasset( "GBP", dan_id ); generate_block( ~database::skip_fork_db ); @@ -468,7 +468,7 @@ BOOST_AUTO_TEST_CASE(track_account) { db.pop_block(); // Try again, should result in same object IDs - create_bitasset( "BTCT", account_id_type() ); + create_bitasset( "BTC", account_id_type() ); create_bitasset( "GBP", dan_id ); generate_block();