Skip to content

Commit

Permalink
Clean up nested scope in GetReservedDestination
Browse files Browse the repository at this point in the history
Suggested bitcoin#17304 (comment)
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.
  • Loading branch information
ryanofsky authored and Michael Polzer committed Apr 11, 2020
1 parent 70c6c86 commit 7c36cfe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/wallet/scriptpubkeyman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,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;
}
Expand Down

0 comments on commit 7c36cfe

Please sign in to comment.