diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-02-16 12:57:47 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2018-02-16 13:00:32 +0000 |
commit | 0851a75b5aad7b05a1cfb4a285ddc9e3319f887b (patch) | |
tree | 3dff73e123be29fbc4de5a96cc2e2f4411ed171e /src/rpc | |
parent | 26dc2daf82d2e4d7a6df233235dd89c3ab990b23 (diff) | |
download | bitcoin-0851a75b5aad7b05a1cfb4a285ddc9e3319f887b.tar.xz |
rpc: Interrupt block generation on shutdown request
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 3f3bfa0cfd..28b16a4025 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -116,7 +116,7 @@ UniValue generateBlocks(std::shared_ptr<CReserveScript> coinbaseScript, int nGen } unsigned int nExtraNonce = 0; UniValue blockHashes(UniValue::VARR); - while (nHeight < nHeightEnd) + while (nHeight < nHeightEnd && !ShutdownRequested()) { std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript)); if (!pblocktemplate.get()) |