From 3491476b6f486a85bef09f1a0bd4d39e1af9d0b1 Mon Sep 17 00:00:00 2001 From: Kewde Date: Fri, 7 Apr 2017 00:53:12 +0000 Subject: [PATCH] Wallet: reduce excess logic InMemPool() removed the excess logic, return directly instead of using if-statement. --- src/wallet/wallet.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 55d81daab..9749bac6a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1760,10 +1760,7 @@ CAmount CWalletTx::GetChange() const bool CWalletTx::InMempool() const { LOCK(mempool.cs); - if (mempool.exists(GetHash())) { - return true; - } - return false; + return mempool.exists(GetHash()); } bool CWalletTx::IsTrusted() const