Limit variable scope

This commit is contained in:
practicalswift
2017-06-04 22:45:22 +02:00
parent f259263a7b
commit 90593ed92c
11 changed files with 21 additions and 23 deletions

View File

@@ -3196,10 +3196,10 @@ void CWallet::ReturnKey(int64_t nIndex)
bool CWallet::GetKeyFromPool(CPubKey& result, bool internal)
{
int64_t nIndex = 0;
CKeyPool keypool;
{
LOCK(cs_wallet);
int64_t nIndex = 0;
ReserveKeyFromKeyPool(nIndex, keypool, internal);
if (nIndex == -1)
{