[DLN] fixed missed_count for participation_rate calculateion on RNG, also hopefully fix missed block count for individual witnesses

This commit is contained in:
SynaptiCAD User 2017-05-30 14:50:49 -04:00
parent d8c7c1e8f4
commit 80e1be9ee0
2 changed files with 4 additions and 4 deletions

View file

@ -55,8 +55,9 @@ void database::update_global_dynamic_data( const signed_block& b )
#else #else
assert( missed_blocks != 0 ); assert( missed_blocks != 0 );
#endif #endif
if (gpo.parameters.witness_schedule_algorithm == GRAPHENE_WITNESS_SHUFFLED_ALGORITHM) // bad if-condition, this code needs to execute for both shuffled and rng algorithms
{ // if (gpo.parameters.witness_schedule_algorithm == GRAPHENE_WITNESS_SHUFFLED_ALGORITHM)
// {
missed_blocks--; missed_blocks--;
for( uint32_t i = 0; i < missed_blocks; ++i ) { for( uint32_t i = 0; i < missed_blocks; ++i ) {
const auto& witness_missed = get_scheduled_witness( i+1 )(*this); const auto& witness_missed = get_scheduled_witness( i+1 )(*this);
@ -72,7 +73,7 @@ void database::update_global_dynamic_data( const signed_block& b )
}); });
} }
} }
} // }
#ifdef DIRTY_TRICK #ifdef DIRTY_TRICK
} }
#endif #endif

@ -1 +0,0 @@
Subproject commit c1f098e14a9f1d4e31b539b63265ffe575240d10