HomePhabricator

Increase the number of round we do before generating a new block template when…

Description

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

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% .

Reviewers: freetrader, sickpig, awemany, kyuupichan, #bitcoin_abc

Reviewed By: freetrader, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D256

Details

Provenance
deadalnixAuthored on Jun 22 2017, 21:28
deadalnixPushed on Jun 22 2017, 22:10
Reviewer
Restricted Project
Differential Revision
D256: Increase the number of round we do before generating a new block template when CPU mining
Parents
rABCa9fa5c8f475c: Add two simple test framework self-tests
Branches
Unknown
Tags
Unknown