Skip to content

Commit 0851a75

Browse files
committed
rpc: Interrupt block generation on shutdown request
1 parent 26dc2da commit 0851a75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rpc/mining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ UniValue generateBlocks(std::shared_ptr<CReserveScript> coinbaseScript, int nGen
116116
}
117117
unsigned int nExtraNonce = 0;
118118
UniValue blockHashes(UniValue::VARR);
119-
while (nHeight < nHeightEnd)
119+
while (nHeight < nHeightEnd && !ShutdownRequested())
120120
{
121121
std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript));
122122
if (!pblocktemplate.get())

0 commit comments

Comments
 (0)