Skip to content

Commit

Permalink
hf time fixes, tests names and cmp condition fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ddylko authored and ddylko committed Jul 25, 2019
1 parent 884fce4 commit d5076ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion libraries/chain/hardfork.d/CORE_1800.hf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// bitshares-core issue #1800 Fix "Temp-account market fee sharing"
#ifndef HARDFORK_CORE_1800_TIME
#define HARDFORK_CORE_1800_TIME (fc::time_point_sec( 1563888919 )) // Tue, 23 Jul 2019 13:35:00 UTC
#define HARDFORK_CORE_1800_TIME (fc::time_point_sec( 1600000000 )) // Tue, 23 Jul 2019 13:35:00 UTC
#endif
18 changes: 6 additions & 12 deletions tests/tests/market_fee_sharing_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ struct reward_database_fixture : database_fixture
database_fixture::generate_block();
}

void generate_blocks_before_hf1800()
{
database_fixture::generate_blocks( HARDFORK_CORE_1800_TIME );
// database_fixture::generate_block();
}

void generate_blocks_past_hf1800()
{
database_fixture::generate_blocks( HARDFORK_CORE_1800_TIME );
Expand Down Expand Up @@ -457,13 +451,13 @@ BOOST_AUTO_TEST_CASE(create_actors)
FC_LOG_AND_RETHROW()
}

BOOST_AUTO_TEST_CASE(MFS_before_hardfork_1800)
BOOST_AUTO_TEST_CASE(fee_shares_between_temp_acc_and_committee_acc)
{
try
{
INVOKE(create_actors);

generate_blocks_before_hf1800();
generate_blocks_past_hf1268();
GET_ACTOR(jill);

constexpr auto jillcoin_reward_percent = 2*GRAPHENE_1_PERCENT;
Expand All @@ -481,15 +475,15 @@ BOOST_AUTO_TEST_CASE(MFS_before_hardfork_1800)
create_sell_order( alice, jillcoin.amount(100000), core_asset(1) );
create_sell_order( old, core_asset(1), jillcoin.amount(100000) );

BOOST_CHECK_GE( get_market_fee_reward( GRAPHENE_TEMP_ACCOUNT(db), jillcoin), 0);
BOOST_CHECK_GE( get_market_fee_reward( GRAPHENE_COMMITTEE_ACCOUNT(db), jillcoin), 0);
BOOST_CHECK_GT( get_market_fee_reward( GRAPHENE_TEMP_ACCOUNT(db), jillcoin), 0);
BOOST_CHECK_GT( get_market_fee_reward( GRAPHENE_COMMITTEE_ACCOUNT(db), jillcoin), 0);

}
FC_LOG_AND_RETHROW()

}

BOOST_AUTO_TEST_CASE(MFS_after_hardfork_1800)
BOOST_AUTO_TEST_CASE(fee_do_not_shares_between_temp_acc_and_committee_acc)
{
try
{
Expand All @@ -515,7 +509,7 @@ BOOST_AUTO_TEST_CASE(MFS_after_hardfork_1800)


BOOST_CHECK_EQUAL( get_market_fee_reward( GRAPHENE_TEMP_ACCOUNT(db), jillcoin), 0);
BOOST_CHECK_GE( get_market_fee_reward( GRAPHENE_COMMITTEE_ACCOUNT(db), jillcoin), 0);
BOOST_CHECK_GT( get_market_fee_reward( GRAPHENE_COMMITTEE_ACCOUNT(db), jillcoin), 0);

}
FC_LOG_AND_RETHROW()
Expand Down

0 comments on commit d5076ee

Please sign in to comment.