aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-11-05 10:47:07 -0500
committerRussell Yanofsky <russ@yanofsky.org>2019-11-05 10:47:07 -0500
commitbfd826a675445801adec86a469040f3ceb8172ee (patch)
tree09415d8f68a4549bb07d8510b5d30eed0727923d
parent491a599b37f3e3a648e52aebed677ca11b0615e2 (diff)
Clean up nested scope in GetReservedDestination
Suggested https://github.com/bitcoin/bitcoin/pull/17304#discussion_r341194391 by Gregory Sanders <gsanders87@gmail.com> Reason for keeping the `return true` `return false` verbosity is that more code will be added after the ReserveKeyFromKeyPool() call before returning.
-rw-r--r--src/wallet/scriptpubkeyman.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp
index ce7cf36924..3eaaf3786c 100644
--- a/src/wallet/scriptpubkeyman.cpp
+++ b/src/wallet/scriptpubkeyman.cpp
@@ -264,10 +264,8 @@ bool LegacyScriptPubKeyMan::EncryptKeys(CKeyingMaterial& vMasterKeyIn)
bool LegacyScriptPubKeyMan::GetReservedDestination(const OutputType type, bool internal, int64_t& index, CKeyPool& keypool)
{
- {
- if (!ReserveKeyFromKeyPool(index, keypool, internal)) {
- return false;
- }
+ if (!ReserveKeyFromKeyPool(index, keypool, internal)) {
+ return false;
}
return true;
}