Skip to content

Commit

Permalink
Fix searchlogs rpc call bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Neil committed Aug 6, 2018
1 parent 181cf38 commit 53f154c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,12 +1489,20 @@ UniValue searchlogs(const JSONRPCRequest& request)

auto topics = params.topics;

std::set<uint256> dupes;

for(const auto& hashesTx : hashesToBlock)
{
for(const auto& e : hashesTx)
{

if(dupes.find(e) != dupes.end()) {
continue;
}
dupes.insert(e);

std::vector<TransactionReceiptInfo> receipts = pstorageresult->getResult(uintToh256(e));

for(const auto& receipt : receipts) {
if(receipt.logs.empty()) {
continue;
Expand Down

0 comments on commit 53f154c

Please sign in to comment.