diff options
| author | Russell Yanofsky <[email protected]> | 2019-11-05 10:47:07 -0500 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2019-11-05 10:47:07 -0500 |
| commit | bfd826a675445801adec86a469040f3ceb8172ee (patch) | |
| tree | 09415d8f68a4549bb07d8510b5d30eed0727923d /src/wallet/scriptpubkeyman.cpp | |
| parent | Get rid of confusing LegacyScriptPubKeyMan::TopUpKeyPool method (diff) | |
| download | discoin-bfd826a675445801adec86a469040f3ceb8172ee.tar.xz discoin-bfd826a675445801adec86a469040f3ceb8172ee.zip | |
Clean up nested scope in GetReservedDestination
Suggested https://github.com/bitcoin/bitcoin/pull/17304#discussion_r341194391
by Gregory Sanders <[email protected]>
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.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index ce7cf3692..3eaaf3786 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; } |