mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-27 07:42:14 +00:00
use a switch when validating tags
This commit is contained in:
parent
56abea7427
commit
16cf7a5e0a
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
abci "github.com/tendermint/abci/types"
|
||||||
cmn "github.com/tendermint/tmlibs/common"
|
cmn "github.com/tendermint/tmlibs/common"
|
||||||
"github.com/tendermint/tmlibs/log"
|
"github.com/tendermint/tmlibs/log"
|
||||||
tmpubsub "github.com/tendermint/tmlibs/pubsub"
|
tmpubsub "github.com/tendermint/tmlibs/pubsub"
|
||||||
@ -96,9 +97,10 @@ func (b *EventBus) PublishEventTx(event EventDataTx) error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if tag.ValueString != "" {
|
switch tag.ValueType {
|
||||||
|
case abci.KVPair_STRING:
|
||||||
tags[tag.Key] = tag.ValueString
|
tags[tag.Key] = tag.ValueString
|
||||||
} else {
|
case abci.KVPair_INT:
|
||||||
tags[tag.Key] = tag.ValueInt
|
tags[tag.Key] = tag.ValueInt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user