Skip to content

Commit

Permalink
fix: dev: pos-452 test log event type
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcello Ardizzone committed Jun 3, 2022
1 parent 4bd6eac commit 5642ddb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bridge/setu/util/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,14 @@ func GetUnconfirmedTxnCount() int {

// LogElapsedTimeForStateSyncedEvent logs useful info if event is of type statesender.StatesenderStateSynced
func LogElapsedTimeForStateSyncedEvent(event interface{}, functionName string, startTime time.Time) {
switch event.(type) {
switch eType := event.(type) {
case statesender.StatesenderStateSynced:
event := event.(statesender.StatesenderStateSynced)
logger.Info("StateSyncedEvent: "+functionName,
"stateSyncId", event.Id,
"timeElapsed", time.Now().Sub(startTime).Milliseconds())
default:
logger.Info("Different type", "type", eType)
// do nothing
}

Expand Down

0 comments on commit 5642ddb

Please sign in to comment.