Page MenuHomePhabricator

Increase the number of round we do before generating a new block template when CPU mining
ClosedPublic

Authored by deadalnix on Jun 22 2017, 21:30.

Details

Summary

When mining big block, the CreateNewBlock function takes longer to run. However, that function needs to lock cs_main . When running many thread on larger blocks, this cuases contention. Reducing the number of template we generate nicely avoid the contention.

Test Plan

Mining on test net. Without this patch, not all core are utilized at 100% because they are waiting on the lock. With the patch, it's all 100% .

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable