Some early refactoring to support async miners better.

This commit is contained in:
Gav Wood 2015-04-11 15:52:36 +02:00
parent 4615f8cd1a
commit d0efe9333f

View File

@ -587,7 +587,7 @@ void overwriteBlockHeader(BlockInfo& _currentBlockHeader, mObject& _blObj)
_currentBlockHeader = tmp; _currentBlockHeader = tmp;
ProofOfWork pow; ProofOfWork pow;
std::pair<MineInfo, Ethash::Proof> ret; std::pair<MineInfo, Ethash::Solution> ret;
while (!ProofOfWork::verify(_currentBlockHeader)) while (!ProofOfWork::verify(_currentBlockHeader))
{ {
ret = pow.mine(_currentBlockHeader, 1000, true); ret = pow.mine(_currentBlockHeader, 1000, true);
@ -632,7 +632,7 @@ BlockInfo constructBlock(mObject& _o)
void updatePoW(BlockInfo& _bi) void updatePoW(BlockInfo& _bi)
{ {
ProofOfWork pow; ProofOfWork pow;
std::pair<MineInfo, Ethash::Proof> ret; std::pair<MineInfo, Ethash::Solution> ret;
while (!ProofOfWork::verify(_bi)) while (!ProofOfWork::verify(_bi))
{ {
ret = pow.mine(_bi, 10000, true); ret = pow.mine(_bi, 10000, true);