Skip to content

Commit bfd826a

Browse files
committed
Clean up nested scope in GetReservedDestination
Suggested bitcoin/bitcoin#17304 (comment) 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.
1 parent 491a599 commit bfd826a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/wallet/scriptpubkeyman.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,8 @@ bool LegacyScriptPubKeyMan::EncryptKeys(CKeyingMaterial& vMasterKeyIn)
264264

265265
bool LegacyScriptPubKeyMan::GetReservedDestination(const OutputType type, bool internal, int64_t& index, CKeyPool& keypool)
266266
{
267-
{
268-
if (!ReserveKeyFromKeyPool(index, keypool, internal)) {
269-
return false;
270-
}
267+
if (!ReserveKeyFromKeyPool(index, keypool, internal)) {
268+
return false;
271269
}
272270
return true;
273271
}

0 commit comments

Comments
 (0)