From 75c22ceda1766f8b64ca68f3b66204030b7a5d37 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 6 Aug 2018 23:53:27 +0000 Subject: [PATCH] Fix waitforlogs rpc call bug --- src/rpc/blockchain.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index de22453b7e..9e94860b16 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1359,8 +1359,16 @@ UniValue waitforlogs(const JSONRPCRequest& request_) { UniValue jsonLogs(UniValue::VARR); + std::set dupes; + for (const auto& txHashes : hashesToBlock) { for (const auto& txHash : txHashes) { + + if(dupes.find(txHash) != dupes.end()) { + continue; + } + dupes.insert(txHash); + std::vector receipts = pstorageresult->getResult( uintToh256(txHash));