Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed Mar 8, 2024
1 parent 4c7756a commit c6123af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 5 additions & 0 deletions process/elasticproc/elasticProcessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ func TestElasticProcessor_RemoveTransactions(t *testing.T) {
require.True(t, strings.Contains(bodyStr, expectedHashes[0]))
require.True(t, strings.Contains(bodyStr, expectedHashes[1]))
called = true
} else {
require.Equal(t,
`{"query": {"bool": {"must": [{"match": {"shardID": {"query": 4294967295,"operator": "AND"}}},{"match": {"timestamp": {"query": "0","operator": "AND"}}}]}}}`,
body.String(),
)
}

return nil
Expand Down
6 changes: 3 additions & 3 deletions process/elasticproc/logsevents/logsAndEventsProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,17 @@ func (lep *logsAndEventsProcessor) prepareLogsForDB(
continue
}

ev := &data.Event{
logEvent := &data.Event{
Address: lep.pubKeyConverter.SilentEncode(event.GetAddress(), log),
Identifier: string(event.GetIdentifier()),
Topics: event.GetTopics(),
Data: event.GetData(),
AdditionalData: event.GetAdditionalData(),
Order: idx,
}
logsDB.Events = append(logsDB.Events, ev)
logsDB.Events = append(logsDB.Events, logEvent)

dbEvent, ok := lep.prepareLogEvent(logsDB, ev, shardID)
dbEvent, ok := lep.prepareLogEvent(logsDB, logEvent, shardID)
if !ok {
continue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func TestLogsAndEventsProcessor_PrepareLogsForDB(t *testing.T) {
},
}}, 1234, 0, 3)

logsDB, eventsDB := proc.PrepareLogsForDB(logsAndEvents, 1234, 0)
logsDB, _ := proc.PrepareLogsForDB(logsAndEvents, 1234, 0)
require.Equal(t, &data.Logs{
ID: "747848617368",
Address: "61646472657373",
Expand All @@ -251,8 +251,6 @@ func TestLogsAndEventsProcessor_PrepareLogsForDB(t *testing.T) {
},
},
}, logsDB[0])

_ = eventsDB
}

func TestLogsAndEventsProcessor_ExtractDataFromLogsNFTBurn(t *testing.T) {
Expand Down

0 comments on commit c6123af

Please sign in to comment.