aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2017-06-04 22:45:22 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2017-06-05 00:52:36 +0200
commit90593ed92cfd5d49900a6fb6c2c10a482ab9fdbb (patch)
tree1f830a3679ef00b774dc8ac6b216366f2ed52a68 /src/wallet
parentf259263a7b11c6ff925851985ef0082b0a190a57 (diff)
Limit variable scope
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/db.cpp2
-rw-r--r--src/wallet/wallet.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 25f6bdd9d9..2df438989a 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -361,7 +361,6 @@ void CDBEnv::CheckpointLSN(const std::string& strFile)
CDB::CDB(CWalletDBWrapper& dbw, const char* pszMode, bool fFlushOnCloseIn) : pdb(NULL), activeTxn(NULL)
{
- int ret;
fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
fFlushOnClose = fFlushOnCloseIn;
env = dbw.env;
@@ -384,6 +383,7 @@ CDB::CDB(CWalletDBWrapper& dbw, const char* pszMode, bool fFlushOnCloseIn) : pdb
++env->mapFileUseCount[strFile];
pdb = env->mapDb[strFile];
if (pdb == NULL) {
+ int ret;
pdb = new Db(env->dbenv, 0);
bool fMockDb = env->IsMock();
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index bc98435249..2eed116dd3 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -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)
{