Narrow scope of lock.

This commit is contained in:
Simon 2016-07-11 22:01:15 -07:00
parent 1db13d5063
commit 933bff472d
1 changed files with 1 additions and 1 deletions

View File

@ -782,8 +782,8 @@ Value getblocksubsidy(const Array& params, bool fHelp)
+ HelpExampleRpc("getblockubsidy", "1000")
);
LOCK(cs_main);
int nHeight = params[0].get_int();
LOCK(cs_main);
if (nHeight < 0 || nHeight > chainActive.Height())
throw JSONRPCError(RPC_INVALID_PARAMETER, "Block height out of range");