Skip to content

Commit

Permalink
Merge pull request EOSIO#148 from enumivo/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
Enumivo authored May 24, 2018
2 parents 31ab5f8 + 44665b2 commit 382ce8f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions contracts/enumivo.system/producer_pay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ namespace enumivosystem {
if( timestamp.slot - _gstate.last_producer_schedule_update.slot > 120 ) {
update_elected_producers( timestamp );

print( "maybe update bids \n" );

if( (timestamp.slot - _gstate.last_name_close.slot) > blocks_per_day ) {
print( "update bids" );
name_bid_table bids(_self,_self);
auto idx = bids.get_index<N(highbid)>();
auto highest = idx.begin();
Expand Down
2 changes: 1 addition & 1 deletion contracts/enumivo.system/voting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace enumivosystem {
_producers.modify( *it, 0, [&](auto& p) {
p.time_became_active = block_time;
});
} else if ( block_time.slot > 2 * 21 * 12 + it->time_became_active.slot &&
} else if ( block_time.slot > (2 * 21 * 12 * 100) + it->time_became_active.slot &&
block_time.slot > it->last_produced_block_time.slot + blocks_per_day ) {
_producers.modify( *it, 0, [&](auto& p) {
p.producer_key = public_key();
Expand Down
4 changes: 1 addition & 3 deletions libraries/testing/tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,7 @@ namespace enumivo { namespace testing {
_start_block(control->head_block_time() + fc::microseconds(config::block_interval_us));
auto c = packed_transaction::none;

if( fc::raw::pack_size(trx) > 1000 )
{
wdump((fc::raw::pack_size(trx)));
if( fc::raw::pack_size(trx) > 1000 ) {
c = packed_transaction::zlib;
}

Expand Down
2 changes: 1 addition & 1 deletion unittests/enumivo.system_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ BOOST_FIXTURE_TEST_CASE(multiple_producer_pay, enumivo_system_tester, * boost::u
// re-register deactivated producer and let him produce blocks again
const uint32_t initial_unpaid_blocks = inactive_prod_info["unpaid_blocks"].as<uint32_t>();
regproducer(producer_names[one_inactive_index]);
produce_blocks(21 * 12);
produce_blocks(21 * 12 * 100);
auto reactivated_prod_info = get_producer_info(producer_names[one_inactive_index]);
const uint32_t unpaid_blocks = reactivated_prod_info["unpaid_blocks"].as<uint32_t>();
BOOST_REQUIRE(initial_unpaid_blocks + 12 <= unpaid_blocks);
Expand Down

0 comments on commit 382ce8f

Please sign in to comment.