mirror of
https://github.com/tendermint/tendermint.git
synced 2025-12-23 06:15:19 +00:00
lint: cleanup pending lint errors (#7237)
This commit is contained in:
@@ -23,7 +23,7 @@ type EventBusSubscriber interface {
|
||||
|
||||
type Subscription interface {
|
||||
Out() <-chan tmpubsub.Message
|
||||
Cancelled() <-chan struct{}
|
||||
Cancelled() <-chan struct{} // nolint: misspell
|
||||
Err() error
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ func TestGenesisGood(t *testing.T) {
|
||||
Validators: []GenesisValidator{{pubkey.Address(), pubkey, 10, "myval"}},
|
||||
}
|
||||
genDocBytes, err = tmjson.Marshal(baseGenDoc)
|
||||
assert.NoError(t, err, "error marshalling genDoc")
|
||||
assert.NoError(t, err, "error marshaling genDoc")
|
||||
|
||||
// test base gendoc and check consensus params were filled
|
||||
genDoc, err := GenesisDocFromJSON(genDocBytes)
|
||||
@@ -96,14 +96,14 @@ func TestGenesisGood(t *testing.T) {
|
||||
|
||||
// create json with consensus params filled
|
||||
genDocBytes, err = tmjson.Marshal(genDoc)
|
||||
assert.NoError(t, err, "error marshalling genDoc")
|
||||
assert.NoError(t, err, "error marshaling genDoc")
|
||||
genDoc, err = GenesisDocFromJSON(genDocBytes)
|
||||
assert.NoError(t, err, "expected no error for valid genDoc json")
|
||||
|
||||
// test with invalid consensus params
|
||||
genDoc.ConsensusParams.Block.MaxBytes = 0
|
||||
genDocBytes, err = tmjson.Marshal(genDoc)
|
||||
assert.NoError(t, err, "error marshalling genDoc")
|
||||
assert.NoError(t, err, "error marshaling genDoc")
|
||||
_, err = GenesisDocFromJSON(genDocBytes)
|
||||
assert.Error(t, err, "expected error for genDoc json with block size of 0")
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ var (
|
||||
// SignBytes returns the bytes to be signed
|
||||
// NOTE: chainIDs are part of the SignBytes but not
|
||||
// necessarily the object themselves.
|
||||
// NOTE: Expected to panic if there is an error marshalling.
|
||||
// NOTE: Expected to panic if there is an error marshaling.
|
||||
type Signable interface {
|
||||
SignBytes(chainID string) []byte
|
||||
}
|
||||
|
||||
@@ -492,7 +492,9 @@ func TestAveragingInIncrementProposerPriority(t *testing.T) {
|
||||
{Address: []byte("c"), ProposerPriority: 1}}},
|
||||
// this should average twice but the average should be 0 after the first iteration
|
||||
// (voting power is 0 -> no changes)
|
||||
11, 1 / 3},
|
||||
11,
|
||||
0, // 1 / 3
|
||||
},
|
||||
2: {ValidatorSet{
|
||||
Validators: []*Validator{
|
||||
{Address: []byte("a"), ProposerPriority: 100},
|
||||
|
||||
Reference in New Issue
Block a user