operation_tests2.cpp: Fix witness_create test to comply with new witness schedule (breakage revealed by #427)
This commit is contained in:
parent
cf4efca17f
commit
e1a692b33c
1 changed files with 4 additions and 3 deletions
|
|
@ -453,15 +453,16 @@ BOOST_AUTO_TEST_CASE( witness_create )
|
||||||
generate_block();
|
generate_block();
|
||||||
|
|
||||||
int produced = 0;
|
int produced = 0;
|
||||||
// Make sure we get scheduled exactly once in witnesses.size() blocks
|
// Make sure we get scheduled at least once in witnesses.size()*2 blocks
|
||||||
|
// may take this many unless we measure where in the scheduling round we are
|
||||||
// TODO: intense_test that repeats this loop many times
|
// TODO: intense_test that repeats this loop many times
|
||||||
for( size_t i=0; i<witnesses.size(); i++ )
|
for( size_t i=0, n=witnesses.size()*2; i<n; i++ )
|
||||||
{
|
{
|
||||||
signed_block block = generate_block();
|
signed_block block = generate_block();
|
||||||
if( block.witness == nathan_witness_id )
|
if( block.witness == nathan_witness_id )
|
||||||
produced++;
|
produced++;
|
||||||
}
|
}
|
||||||
BOOST_CHECK_EQUAL( produced, 2 );
|
BOOST_CHECK_GE( produced, 1 );
|
||||||
} FC_LOG_AND_RETHROW() }
|
} FC_LOG_AND_RETHROW() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue