mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 11:45:18 +00:00
Backport kvindexer fix
This commit is contained in:
@@ -156,13 +156,13 @@ func TestBlockIndexerMulti(t *testing.T) {
|
||||
Type: "end_event",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{
|
||||
Key: []byte("foo"),
|
||||
Value: []byte("100"),
|
||||
Key: "foo",
|
||||
Value: "100",
|
||||
Index: true,
|
||||
},
|
||||
{
|
||||
Key: []byte("bar"),
|
||||
Value: []byte("200"),
|
||||
Key: "bar",
|
||||
Value: "200",
|
||||
Index: true,
|
||||
},
|
||||
},
|
||||
@@ -171,13 +171,13 @@ func TestBlockIndexerMulti(t *testing.T) {
|
||||
Type: "end_event",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{
|
||||
Key: []byte("foo"),
|
||||
Value: []byte("300"),
|
||||
Key: "foo",
|
||||
Value: "300",
|
||||
Index: true,
|
||||
},
|
||||
{
|
||||
Key: []byte("bar"),
|
||||
Value: []byte("400"),
|
||||
Key: "bar",
|
||||
Value: "400",
|
||||
Index: true,
|
||||
},
|
||||
},
|
||||
@@ -197,13 +197,13 @@ func TestBlockIndexerMulti(t *testing.T) {
|
||||
Type: "end_event",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{
|
||||
Key: []byte("foo"),
|
||||
Value: []byte("100"),
|
||||
Key: "foo",
|
||||
Value: "100",
|
||||
Index: true,
|
||||
},
|
||||
{
|
||||
Key: []byte("bar"),
|
||||
Value: []byte("200"),
|
||||
Key: "bar",
|
||||
Value: "200",
|
||||
Index: true,
|
||||
},
|
||||
},
|
||||
@@ -212,13 +212,13 @@ func TestBlockIndexerMulti(t *testing.T) {
|
||||
Type: "end_event",
|
||||
Attributes: []abci.EventAttribute{
|
||||
{
|
||||
Key: []byte("foo"),
|
||||
Value: []byte("300"),
|
||||
Key: "foo",
|
||||
Value: "300",
|
||||
Index: true,
|
||||
},
|
||||
{
|
||||
Key: []byte("bar"),
|
||||
Value: []byte("400"),
|
||||
Key: "bar",
|
||||
Value: "400",
|
||||
Index: true,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -144,9 +144,9 @@ func TestTxSearchEventMatch(t *testing.T) {
|
||||
indexer := NewTxIndex(db.NewMemDB())
|
||||
|
||||
txResult := txResultWithEvents([]abci.Event{
|
||||
{Type: "account", Attributes: []abci.EventAttribute{{Key: []byte("number"), Value: []byte("1"), Index: true}, {Key: []byte("owner"), Value: []byte("Ana"), Index: true}}},
|
||||
{Type: "account", Attributes: []abci.EventAttribute{{Key: []byte("number"), Value: []byte("2"), Index: true}, {Key: []byte("owner"), Value: []byte("Ivan"), Index: true}}},
|
||||
{Type: "", Attributes: []abci.EventAttribute{{Key: []byte("not_allowed"), Value: []byte("Vlad"), Index: true}}},
|
||||
{Type: "account", Attributes: []abci.EventAttribute{{Key: "number", Value: "1", Index: true}, {Key: "owner", Value: "Ana", Index: true}}},
|
||||
{Type: "account", Attributes: []abci.EventAttribute{{Key: "number", Value: "2", Index: true}, {Key: "owner", Value: "Ivan", Index: true}}},
|
||||
{Type: "", Attributes: []abci.EventAttribute{{Key: "not_allowed", Value: "Vlad", Index: true}}},
|
||||
})
|
||||
|
||||
err := indexer.Index(txResult)
|
||||
|
||||
Reference in New Issue
Block a user