Skip to content

Commit

Permalink
set variable DefaultEvent exported
Browse files Browse the repository at this point in the history
  • Loading branch information
Tri-stone committed Jul 25, 2019
1 parent 51cdbb6 commit 54b7925
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions abci/types/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

const (
defaultEvent = "origin-tags"
DefaultEvent = "origin-tags"
)

//------------------------------------------------------------------------------
Expand Down Expand Up @@ -41,7 +41,7 @@ func (v ValidatorUpdates) Swap(i, j int) {

func GetTagByKey(events []Event, key string) (common.KVPair, bool) {
for _, event := range events {
if event.GetType() != defaultEvent {
if event.GetType() != DefaultEvent {
continue
}
for _, tag := range event.Attributes {
Expand All @@ -56,10 +56,10 @@ func GetTagByKey(events []Event, key string) (common.KVPair, bool) {

func TagsToDefaultEvent(events []Event, tags ...common.KVPair) []Event {
if len(events) == 0 {
events = append(events, Event{Type: defaultEvent})
events = append(events, Event{Type: DefaultEvent})
}
for i, v := range events {
if v.Type == defaultEvent {
if v.Type == DefaultEvent {
events[i].Attributes = append(events[i].Attributes, tags...)
}
}
Expand All @@ -68,7 +68,7 @@ func TagsToDefaultEvent(events []Event, tags ...common.KVPair) []Event {

func GetDefaultTags(events []Event) []common.KVPair {
for _, v := range events {
if v.Type == defaultEvent {
if v.Type == DefaultEvent {
pairs := make([]common.KVPair, len(v.Attributes))
copy(pairs, v.Attributes)
return pairs
Expand Down

0 comments on commit 54b7925

Please sign in to comment.