fix bug with work distribution

This commit is contained in:
NikVolf 2016-12-09 18:47:01 +01:00
parent e707fd73cb
commit dc6b874ab7
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ impl ChainVerifier {
let mut last = 0;
for num_task in 0..TRANSACTIONS_VERIFY_THREADS {
let from = last;
last = ::std::cmp::max(1, block.transaction_count() / TRANSACTIONS_VERIFY_THREADS);
last = from + ::std::cmp::max(1, block.transaction_count() / TRANSACTIONS_VERIFY_THREADS);
if num_task == TRANSACTIONS_VERIFY_THREADS - 1 { last = block.transaction_count(); };
transaction_tasks.push(Task::new(block, location.height(), from, last));
}