Merge PR #4881: Linting Galore

This commit is contained in:
Marko
2019-08-19 12:06:27 -04:00
committed by Alexander Bezobchuk
parent 89b1220398
commit 3a4f1fc4d4
75 changed files with 209 additions and 284 deletions
+1 -1
View File
@@ -20,4 +20,4 @@ type Config struct {
OnOperation bool // run slow invariants every operation
AllInvariants bool // print all failed invariants if a broken invariant is found
}
}
+1 -1
View File
@@ -38,7 +38,7 @@ func (es EventStats) Print(w io.Writer) {
panic(err)
}
fmt.Fprintf(w, string(obj))
fmt.Fprintln(w, string(obj))
}
// ExportJSON saves the event stats as a JSON file on a given path
+1 -1
View File
@@ -158,7 +158,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params,
}
// return if no past times
if len(pastTimes) <= 0 {
if len(pastTimes) == 0 {
return abci.RequestBeginBlock{
Header: header,
LastCommitInfo: abci.LastCommitInfo{
+1 -1
View File
@@ -98,7 +98,7 @@ func SimulateFromSeed(
go func() {
receivedSignal := <-c
fmt.Fprintf(w, "\nExiting early due to %s, on block %d, operation %d\n", receivedSignal, header.Height, opCount)
err = fmt.Errorf("Exited due to %s", receivedSignal)
err = fmt.Errorf("exited due to %s", receivedSignal)
stopEarly = true
}()
+1 -1
View File
@@ -24,7 +24,7 @@ func CreateTransitionMatrix(weights [][]int) (TransitionMatrix, error) {
for i := 0; i < n; i++ {
if len(weights[i]) != n {
return TransitionMatrix{},
fmt.Errorf("Transition Matrix: Non-square matrix provided, error on row %d", i)
fmt.Errorf("transition matrix: non-square matrix provided, error on row %d", i)
}
}
totals := make([]int, n)