Skip to content

Commit

Permalink
rpc/mining: restore code erroneously dropped in 0e2c963
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed Apr 15, 2021
1 parent 39112e1 commit 0045caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/mining.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static bool GenerateBlock(ChainstateManager& chainman, CBlock& block, uint64_t&
++block.nNonce;
--max_tries;
}
if (max_tries == 0) {
if (max_tries == 0 || ShutdownRequested()) {
return false;
}
if (block.nNonce == std::numeric_limits<uint32_t>::max()) {
Expand Down

0 comments on commit 0045caf

Please sign in to comment.