mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-16 23:53:29 +01:00
rpc: Interrupt block generation on shutdown request
This commit is contained in:
@@ -116,7 +116,7 @@ UniValue generateBlocks(std::shared_ptr<CReserveScript> coinbaseScript, int nGen
|
|||||||
}
|
}
|
||||||
unsigned int nExtraNonce = 0;
|
unsigned int nExtraNonce = 0;
|
||||||
UniValue blockHashes(UniValue::VARR);
|
UniValue blockHashes(UniValue::VARR);
|
||||||
while (nHeight < nHeightEnd)
|
while (nHeight < nHeightEnd && !ShutdownRequested())
|
||||||
{
|
{
|
||||||
std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript));
|
std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript));
|
||||||
if (!pblocktemplate.get())
|
if (!pblocktemplate.get())
|
||||||
|
|||||||
Reference in New Issue
Block a user