From 0ae94f88d4a19c5ae04808d175435e1e3af45a36 Mon Sep 17 00:00:00 2001 From: theoreticalbts Date: Wed, 26 Aug 2015 14:56:20 -0400 Subject: [PATCH] operation_tests2.cpp: Fix production check in witness_create --- tests/tests/operation_tests2.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tests/operation_tests2.cpp b/tests/tests/operation_tests2.cpp index 925c8a8d..dd40976b 100644 --- a/tests/tests/operation_tests2.cpp +++ b/tests/tests/operation_tests2.cpp @@ -443,12 +443,17 @@ BOOST_AUTO_TEST_CASE( witness_create ) auto itr = std::find(witnesses.begin(), witnesses.end(), nathan_witness_id); BOOST_CHECK(itr != witnesses.end()); + // generate blocks until we are at the beginning of a round + while( ((db.get_dynamic_global_properties().current_aslot + 1) % witnesses.size()) != 0 ) + generate_block(); + int produced = 0; // Make sure we get scheduled exactly once in witnesses.size() blocks // TODO: intense_test that repeats this loop many times for( size_t i=0; i