Merge PR #4881: Linting Galore
This commit is contained in:
committed by
Alexander Bezobchuk
parent
89b1220398
commit
3a4f1fc4d4
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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
|
||||
}()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user