Skip to content

Commit

Permalink
Update model/flow/service_event.go
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Schalm <jordan.schalm@flowfoundation.org>
  • Loading branch information
durkmurder and jordanschalm authored Jul 31, 2024
1 parent 41aa73b commit c4c09f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions model/flow/service_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,22 +314,22 @@ func (se *ServiceEvent) EqualTo(other *ServiceEvent) (bool, error) {
}
return version.EqualTo(otherVersion), nil
case ServiceEventSetEpochExtensionViewCount:
version, ok := se.Event.(*SetEpochExtensionViewCount)
typedEvent, ok := se.Event.(*SetEpochExtensionViewCount)
if !ok {
return false, fmt.Errorf(
"internal invalid type for SetEpochExtensionViewCount: %T",
se.Event,
)
}
otherVersion, ok := other.Event.(*SetEpochExtensionViewCount)
otherTypedEvent, ok := other.Event.(*SetEpochExtensionViewCount)
if !ok {
return false,
fmt.Errorf(
"internal invalid type for SetEpochExtensionViewCount: %T",
other.Event,
)
}
return version.EqualTo(otherVersion), nil
return typedEvent.EqualTo(otherTypedEvent), nil

default:
return false, fmt.Errorf("unknown serice event type: %s", se.Type)
Expand Down

0 comments on commit c4c09f8

Please sign in to comment.