From 09195af9d79b882f37ff7d53d32f88872be17a3a Mon Sep 17 00:00:00 2001 From: ptrus Date: Mon, 14 Feb 2022 11:53:55 +0100 Subject: [PATCH] go/consensus/events: use underscores instead of dashes --- go/governance/api/api.go | 6 +++--- go/registry/api/api.go | 10 +++++----- go/roothash/api/api.go | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go/governance/api/api.go b/go/governance/api/api.go index 72e96aa4dcd..3339bbef52f 100644 --- a/go/governance/api/api.go +++ b/go/governance/api/api.go @@ -279,7 +279,7 @@ type ProposalSubmittedEvent struct { // EventKind returns a string representation of this event's kind. func (e *ProposalSubmittedEvent) EventKind() string { - return "proposal-submitted" + return "proposal_submitted" } // ProposalExecutedEvent is emitted when a proposal is executed. @@ -290,7 +290,7 @@ type ProposalExecutedEvent struct { // EventKind returns a string representation of this event's kind. func (e *ProposalExecutedEvent) EventKind() string { - return "proposal-executed" + return "proposal_executed" } // ProposalFinalizedEvent is the event emitted when a proposal is finalized. @@ -303,7 +303,7 @@ type ProposalFinalizedEvent struct { // EventKind returns a string representation of this event's kind. func (e *ProposalFinalizedEvent) EventKind() string { - return "proposal-finalized" + return "proposal_finalized" } // VoteEvent is the event emitted when a vote is cast. diff --git a/go/registry/api/api.go b/go/registry/api/api.go index a9548d07685..481e31c86e4 100644 --- a/go/registry/api/api.go +++ b/go/registry/api/api.go @@ -284,7 +284,7 @@ type EntityEvent struct { // EventKind returns a string representation of this event's kind. func (e *EntityEvent) EventKind() string { - return "entity-event" + return "entity" } // NodeEvent is the event that is returned via WatchNodes to signify node @@ -296,7 +296,7 @@ type NodeEvent struct { // EventKind returns a string representation of this event's kind. func (e *NodeEvent) EventKind() string { - return "node-event" + return "node" } // RuntimeEvent signifies new runtime registration. @@ -306,7 +306,7 @@ type RuntimeEvent struct { // EventKind returns a string representation of this event's kind. func (e *RuntimeEvent) EventKind() string { - return "runtime-event" + return "runtime" } // NodeUnfrozenEvent signifies when node becomes unfrozen. @@ -316,7 +316,7 @@ type NodeUnfrozenEvent struct { // EventKind returns a string representation of this event's kind. func (e *NodeUnfrozenEvent) EventKind() string { - return "node-unfrozen-event" + return "node_unfrozen" } var _ events.CustomTypedAttribute = (*NodeListEpochEvent)(nil) @@ -326,7 +326,7 @@ type NodeListEpochEvent struct{} // EventKind returns a string representation of this event's kind. func (e *NodeListEpochEvent) EventKind() string { - return "node-list-epoch-event" + return "node_list_epoch" } // EventValue returns a string representation of this event's kind. diff --git a/go/roothash/api/api.go b/go/roothash/api/api.go index 65ea0d766db..b6c0a02797c 100644 --- a/go/roothash/api/api.go +++ b/go/roothash/api/api.go @@ -414,7 +414,7 @@ type ExecutorCommittedEvent struct { // EventKind returns a string representation of this event's kind. func (e *ExecutorCommittedEvent) EventKind() string { - return "executor-committ" + return "executor_commit" } // ExecutionDiscrepancyDetectedEvent is an execute discrepancy detected event. @@ -425,7 +425,7 @@ type ExecutionDiscrepancyDetectedEvent struct { // EventKind returns a string representation of this event's kind. func (e *ExecutionDiscrepancyDetectedEvent) EventKind() string { - return "execution-discrepancy" + return "execution_discrepancy" } var _ events.CustomTypedAttribute = (*RuntimeIDAttribute)(nil)