Skip to content

Commit

Permalink
Fix event sql query (#1984) (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel authored Jul 9, 2024
1 parent add7e32 commit 741cc65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions go/enclave/storage/enclavedb/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ func WriteEventTopic(ctx context.Context, dbTX *sql.Tx, topic *gethcommon.Hash,
return uint64(id), nil
}

func UpdateEventTopicLifecycle(ctx context.Context, dbTx *sql.Tx, etId uint64, isLifecycle bool) error {
_, err := dbTx.ExecContext(ctx, "update event_topic set lifecycle_event=? where id=?", isLifecycle, etId)
func UpdateEventTypeLifecycle(ctx context.Context, dbTx *sql.Tx, etId uint64, isLifecycle bool) error {
_, err := dbTx.ExecContext(ctx, "update event_type set lifecycle_event=? where id=?", isLifecycle, etId)
return err
}

Expand Down
2 changes: 1 addition & 1 deletion go/enclave/storage/events_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (es *eventsStorage) handleEventType(ctx context.Context, dbTX *sql.Tx, l *t
if err == nil {
// in case we determined the current emitted event is not lifecycle, we must update the EventType
if !isLifecycle && et.isLifecycle {
err := enclavedb.UpdateEventTopicLifecycle(ctx, dbTX, et.id, isLifecycle)
err := enclavedb.UpdateEventTypeLifecycle(ctx, dbTX, et.id, isLifecycle)
if err != nil {
return 0, fmt.Errorf("could not update the event type. cause: %w", err)
}
Expand Down

0 comments on commit 741cc65

Please sign in to comment.