mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Limit variable scope
This commit is contained in:
parent
f259263a7b
commit
90593ed92c
11 changed files with 21 additions and 23 deletions
|
|
@ -98,15 +98,13 @@ UniValue getnetworkhashps(const JSONRPCRequest& request)
|
|||
UniValue generateBlocks(std::shared_ptr<CReserveScript> coinbaseScript, int nGenerate, uint64_t nMaxTries, bool keepScript)
|
||||
{
|
||||
static const int nInnerLoopCount = 0x10000;
|
||||
int nHeightStart = 0;
|
||||
int nHeightEnd = 0;
|
||||
int nHeight = 0;
|
||||
|
||||
{ // Don't keep cs_main locked
|
||||
LOCK(cs_main);
|
||||
nHeightStart = chainActive.Height();
|
||||
nHeight = nHeightStart;
|
||||
nHeightEnd = nHeightStart+nGenerate;
|
||||
nHeight = chainActive.Height();
|
||||
nHeightEnd = nHeight+nGenerate;
|
||||
}
|
||||
unsigned int nExtraNonce = 0;
|
||||
UniValue blockHashes(UniValue::VARR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue