From cb9743e5671776d683cdb9a51de7d12854a2acae Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 29 Nov 2017 20:30:37 -0600 Subject: [PATCH] dummy app now returns one DeliverTx tag --- glide.lock | 6 +++--- glide.yaml | 2 +- rpc/client/rpc_test.go | 7 +++++++ rpc/test/helpers.go | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/glide.lock b/glide.lock index 2e49ff5ab..47ce1697a 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: b4e6f2f40e2738e45cec07ed91a5733d94d29cdfa0c7eb686a4d0a34512e2097 -updated: 2017-11-29T18:57:12.922510534Z +hash: dba99959eb071d0e99be1a11c608ddafe5349866c8141000efbd57f4c5f8353e +updated: 2017-11-30T02:23:12.150634867Z imports: - name: github.com/btcsuite/btcd version: 8cea3866d0f7fb12d567a20744942c0d078c7d15 @@ -98,7 +98,7 @@ imports: - leveldb/table - leveldb/util - name: github.com/tendermint/abci - version: 5c29adc081795b04f9d046fb51d76903c22cfa6d + version: 72c3ea3872424fba6b564de9d722acd74e6ecedc subpackages: - client - example/counter diff --git a/glide.yaml b/glide.yaml index 9d37891dd..4c7d69bda 100644 --- a/glide.yaml +++ b/glide.yaml @@ -18,7 +18,7 @@ import: - package: github.com/spf13/viper version: v1.0.0 - package: github.com/tendermint/abci - version: develop + version: 72c3ea3872424fba6b564de9d722acd74e6ecedc subpackages: - client - example/dummy diff --git a/rpc/client/rpc_test.go b/rpc/client/rpc_test.go index 6eab5b85d..2f449cf99 100644 --- a/rpc/client/rpc_test.go +++ b/rpc/client/rpc_test.go @@ -333,5 +333,12 @@ func TestTxSearch(t *testing.T) { results, err = c.TxSearch(fmt.Sprintf("tx.hash='%X'", anotherTxHash), false) require.Nil(t, err, "%+v", err) require.Len(t, results, 0) + + // we query using a tag (see dummy application) + results, err = c.TxSearch("app.creator='jae'", false) + require.Nil(t, err, "%+v", err) + if len(results) == 0 { + t.Fatal("expected a lot of transactions") + } } } diff --git a/rpc/test/helpers.go b/rpc/test/helpers.go index f6526011f..73da30ad6 100644 --- a/rpc/test/helpers.go +++ b/rpc/test/helpers.go @@ -80,6 +80,7 @@ func GetConfig() *cfg.Config { globalConfig.P2P.ListenAddress = tm globalConfig.RPC.ListenAddress = rpc globalConfig.RPC.GRPCListenAddress = grpc + globalConfig.TxIndex.IndexTags = "app.creator" // see dummy application } return globalConfig }