indexer: allow indexing an event at runtime (#4466)

The PR added a new field `index` to event attribute, that will cause indexer service to index the event if set to true.
This commit is contained in:
Diep Pham
2020-04-22 17:07:03 +07:00
committed by GitHub
parent 0a159c2613
commit 843d63f935
14 changed files with 757 additions and 279 deletions

View File

@@ -17,7 +17,6 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
cfg "github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/crypto/ed25519"
"github.com/tendermint/tendermint/libs/kv"
"github.com/tendermint/tendermint/libs/rand"
tmrand "github.com/tendermint/tendermint/libs/rand"
sm "github.com/tendermint/tendermint/state"
@@ -136,8 +135,8 @@ func TestABCIResponsesSaveLoad2(t *testing.T) {
{
Data: []byte("Gotcha!"),
Events: []abci.Event{
{Type: "type1", Attributes: []kv.Pair{{Key: []byte("a"), Value: []byte("1")}}},
{Type: "type2", Attributes: []kv.Pair{{Key: []byte("build"), Value: []byte("stuff")}}},
{Type: "type1", Attributes: []abci.EventAttribute{{Key: []byte("a"), Value: []byte("1")}}},
{Type: "type2", Attributes: []abci.EventAttribute{{Key: []byte("build"), Value: []byte("stuff")}}},
},
},
},