From 53f154c3e363e581a0e44adf2a1d646b69cc54f1 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 6 Aug 2018 21:45:56 +0000 Subject: [PATCH] Fix searchlogs rpc call bug --- src/rpc/blockchain.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 7d981277f4..de22453b7e 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1489,12 +1489,20 @@ UniValue searchlogs(const JSONRPCRequest& request) auto topics = params.topics; + std::set dupes; + for(const auto& hashesTx : hashesToBlock) { for(const auto& e : hashesTx) { + + if(dupes.find(e) != dupes.end()) { + continue; + } + dupes.insert(e); + std::vector receipts = pstorageresult->getResult(uintToh256(e)); - + for(const auto& receipt : receipts) { if(receipt.logs.empty()) { continue;