add tx_search RPC endpoint

This commit is contained in:
Anton Kaliaev
2017-11-29 14:24:18 -06:00
parent ea0b205455
commit 3e577ccf4f
3 changed files with 45 additions and 0 deletions
+4
View File
@@ -4,6 +4,7 @@ import (
"errors"
"github.com/tendermint/tendermint/types"
"github.com/tendermint/tmlibs/pubsub/query"
)
// TxIndexer interface defines methods to index and search transactions.
@@ -18,6 +19,9 @@ type TxIndexer interface {
// Get returns the transaction specified by hash or nil if the transaction is not indexed
// or stored.
Get(hash []byte) (*types.TxResult, error)
// Search allows you to query for transactions.
Search(q *query.Query) ([]*types.TxResult, error)
}
//----------------------------------------------------