Address reviews

This commit is contained in:
Adrian Brink
2017-10-23 11:04:45 -04:00
committed by Ethan Buchman
parent 782a836db0
commit 036d3b59a3
6 changed files with 12 additions and 10 deletions
+2 -2
View File
@@ -233,8 +233,8 @@ func (s *State) Bytes() []byte {
return wire.BinaryBytes(s)
}
// SetBlockAndValidators mutates State variables to update block and validators after running
// EndBlock.
// SetBlockAndValidators mutates State variables
// to update block and validators after running EndBlock.
func (s *State) SetBlockAndValidators(header *types.Header, blockPartsHeader types.PartSetHeader,
abciResponses *ABCIResponses) {
+2 -3
View File
@@ -24,9 +24,8 @@ type TxIndexer interface {
//----------------------------------------------------
// Txs are written as a batch
// Batch groups together multiple Index operations you would like performed
// at the same time.
// NOTE: Bach is NOT thread-safe and should not be modified after starting its execution.
// Batch groups together multiple Index operations to be performed at the same time.
// NOTE: Batch is NOT thread-safe and must not be modified after starting its execution.
type Batch struct {
Ops []types.TxResult
}
+2 -2
View File
@@ -10,12 +10,12 @@ import (
// TxIndex acts as a /dev/null.
type TxIndex struct{}
// Get with a hash panics.
// Get on a TxIndex is disabled and panics when invoked.
func (txi *TxIndex) Get(hash []byte) (*types.TxResult, error) {
return nil, errors.New(`Indexing is disabled (set 'tx_index = "kv"' in config)`)
}
// AddBatch returns nil.
// AddBatch is a noop and always returns nil.
func (txi *TxIndex) AddBatch(batch *txindex.Batch) error {
return nil
}