aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/scriptpubkeyman.cpp
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 /src/wallet/scriptpubkeyman.cpp
parent491a599b37f3e3a648e52aebed677ca11b0615e2 (diff)
downloadbitcoin-bfd826a675445801adec86a469040f3ceb8172ee.tar.xz
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.
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
-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;
}