update deps

This commit is contained in:
Anton Kaliaev
2017-11-29 13:51:28 -06:00
parent acbc0717d4
commit 10d893ee9b
4 changed files with 8 additions and 26 deletions

View File

@@ -68,7 +68,7 @@ func (txi *TxIndex) AddBatch(b *txindex.Batch) error {
// index tx by tags
for _, tag := range result.Result.Tags {
if stringInSlice(tag.Key, txi.tagsToIndex) {
if cmn.StringInSlice(tag.Key, txi.tagsToIndex) {
storeBatch.Set(keyForTag(tag, result), hash)
}
}
@@ -146,7 +146,7 @@ func (txi *TxIndex) Search(q *query.Query) ([]*types.TxResult, error) {
// for all other conditions
for i, c := range conditions {
if intInSlice(i, skipIndexes) {
if cmn.IntInSlice(i, skipIndexes) {
continue
}
@@ -356,24 +356,6 @@ func keyForTag(tag *abci.KVPair, result *types.TxResult) []byte {
///////////////////////////////////////////////////////////////////////////////
// Utils
func stringInSlice(a string, list []string) bool {
for _, b := range list {
if b == a {
return true
}
}
return false
}
func intInSlice(a int, list []int) bool {
for _, b := range list {
if b == a {
return true
}
}
return false
}
func intersect(as, bs [][]byte) [][]byte {
i := make([][]byte, 0, cmn.MinInt(len(as), len(bs)))
for _, a := range as {