Skip to content

Commit

Permalink
Addressed more PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kidambisrinivas committed Sep 30, 2024
1 parent c48b80d commit 33bed46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions core/capabilities/triggers/logevent/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ const defaultSendChannelBufferSize = 1000
type Input struct {
}

// Log Event Trigger Capability Payload
type Payload struct {
// Time that Log Event Trigger's task execution occurred (RFC3339Nano formatted)
ActualExecutionTime string
}

// Log Event Trigger Capabilities Manager
// Manages different log event triggers using an underlying triggerStore
type TriggerService struct {
Expand Down
1 change: 1 addition & 0 deletions core/capabilities/triggers/logevent/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestLogEventTriggerEVMHappyPath(t *testing.T) {
require.NoError(t, err)
th.BackendTH.Backend.Commit()
th.BackendTH.Backend.Commit()
th.BackendTH.Backend.Commit()
}()

// Wait for logs with a timeout
Expand Down
5 changes: 4 additions & 1 deletion core/capabilities/triggers/logevent/trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (l *logEventTrigger) listen() {
query.KeyFilter{
Key: l.reqConfig.ContractEventName,
Expressions: []query.Expression{
query.Confidence(primitives.Unconfirmed),
query.Confidence(primitives.Finalized),
query.Block(fmt.Sprintf("%d", l.startBlockNum), primitives.Gte),
},
},
Expand All @@ -170,6 +170,9 @@ func (l *logEventTrigger) listen() {
continue
}
for _, log := range logs {
if log.Cursor == cursor {
continue
}
triggerResp := createTriggerResponse(log, l.logEventConfig.Version(ID))
l.ch <- triggerResp
cursor = log.Cursor
Expand Down

0 comments on commit 33bed46

Please sign in to comment.