From 33f35523c6605b47b095cc91b784473ba5710a9e Mon Sep 17 00:00:00 2001 From: Shoham Chakraborty Date: Sat, 14 Jan 2023 18:14:34 +0800 Subject: [PATCH] Add early return in shouldContinueToNextAccountHistory --- src/masternodes/rpc_accounts.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/masternodes/rpc_accounts.cpp b/src/masternodes/rpc_accounts.cpp index 5cdfacc49e..86ef7c3fe5 100644 --- a/src/masternodes/rpc_accounts.cpp +++ b/src/masternodes/rpc_accounts.cpp @@ -1675,6 +1675,9 @@ UniValue accounthistorycount(const JSONRPCRequest& request) { return false; } + if (!accountSet.empty() && accountSet.count(key.owner) == 0) + return true; + if (isMine && !(IsMineCached(*pwallet, key.owner) & filter)) { return true; }