Browse Source

fix metalinter warnings

pull/835/head
Anton Kaliaev 7 years ago
parent
commit
09941b9aa9
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 4 additions and 5 deletions
  1. +4
    -5
      state/txindex/kv/kv.go

+ 4
- 5
state/txindex/kv/kv.go View File

@ -85,7 +85,10 @@ func (txi *TxIndex) AddBatch(b *txindex.Batch) error {
// Index indexes a single transaction using the given list of tags. // Index indexes a single transaction using the given list of tags.
func (txi *TxIndex) Index(result *types.TxResult) error { func (txi *TxIndex) Index(result *types.TxResult) error {
batch := txindex.NewBatch(1) batch := txindex.NewBatch(1)
batch.Add(result)
err := batch.Add(result)
if err != nil {
return errors.Wrap(err, "failed to add tx result to batch")
}
return txi.AddBatch(batch) return txi.AddBatch(batch)
} }
@ -342,10 +345,6 @@ func keyForTag(tag *abci.KVPair, result *types.TxResult) []byte {
} }
} }
func hashKey(hash []byte) string {
return fmt.Sprintf("%X", hash)
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Utils // Utils


Loading…
Cancel
Save