Browse Source

use a switch when validating tags

pull/835/head
Anton Kaliaev 7 years ago
parent
commit
16cf7a5e0a
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      types/event_bus.go

+ 4
- 2
types/event_bus.go View File

@ -4,6 +4,7 @@ import (
"context"
"fmt"
abci "github.com/tendermint/abci/types"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/log"
tmpubsub "github.com/tendermint/tmlibs/pubsub"
@ -96,9 +97,10 @@ func (b *EventBus) PublishEventTx(event EventDataTx) error {
continue
}
if tag.ValueString != "" {
switch tag.ValueType {
case abci.KVPair_STRING:
tags[tag.Key] = tag.ValueString
} else {
case abci.KVPair_INT:
tags[tag.Key] = tag.ValueInt
}
}


Loading…
Cancel
Save