mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-04 15:17:02 +00:00
linting: cover the basics
This commit is contained in:
committed by
Ethan Buchman
parent
bd9f1d0d4c
commit
6a378d30f3
@@ -57,7 +57,6 @@ func (app *ChainAwareApplication) Query(reqQuery types.RequestQuery) (resQuery t
|
||||
|
||||
func (app *ChainAwareApplication) BeginBlock(reqBeginBlock types.RequestBeginBlock) {
|
||||
app.beginCount++
|
||||
return
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) EndBlock(height uint64) (resEndBlock types.ResponseEndBlock) {
|
||||
|
||||
@@ -166,7 +166,7 @@ func TestValSetChanges(t *testing.T) {
|
||||
|
||||
makeApplyBlock(t, dummy, 3, diff, tx1)
|
||||
|
||||
vals1 = append([]*types.Validator{v1}, vals1[1:len(vals1)]...)
|
||||
vals1 = append([]*types.Validator{v1}, vals1[1:]...)
|
||||
vals2 = dummy.Validators()
|
||||
valsEqual(t, vals1, vals2)
|
||||
|
||||
|
||||
@@ -187,10 +187,7 @@ func MakeValSetChangeTx(pubkey []byte, power uint64) []byte {
|
||||
}
|
||||
|
||||
func isValidatorTx(tx []byte) bool {
|
||||
if strings.HasPrefix(string(tx), ValidatorSetChangePrefix) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return strings.HasPrefix(string(tx), ValidatorSetChangePrefix)
|
||||
}
|
||||
|
||||
// format is "val:pubkey1/power1,addr2/power2,addr3/power3"tx
|
||||
@@ -232,7 +229,7 @@ func (app *PersistentDummyApplication) updateValidator(v *types.Validator) types
|
||||
app.app.state.Set(key, value.Bytes())
|
||||
}
|
||||
|
||||
// we only update the changes array if we succesfully updated the tree
|
||||
// we only update the changes array if we successfully updated the tree
|
||||
app.changes = append(app.changes, v)
|
||||
|
||||
return types.OK
|
||||
|
||||
Reference in New Issue
Block a user