mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 04:55:18 +00:00
fix lint failures with 1.31 (#5489)
This commit is contained in:
@@ -38,9 +38,7 @@ const (
|
||||
EventVote = "Vote"
|
||||
)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ENCODING / DECODING
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// TMEventData implements events.EventData.
|
||||
type TMEventData interface {
|
||||
@@ -127,9 +125,7 @@ type EventDataValidatorSetUpdates struct {
|
||||
ValidatorUpdates []*Validator `json:"validator_updates"`
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// PUBSUB
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const (
|
||||
// EventTypeKey is a reserved composite key for event name.
|
||||
|
||||
@@ -35,7 +35,7 @@ func TestBasicPartSet(t *testing.T) {
|
||||
assert.True(t, partSet2.HasHeader(partSet.Header()))
|
||||
for i := 0; i < int(partSet.Total()); i++ {
|
||||
part := partSet.GetPart(i)
|
||||
//t.Logf("\n%v", part)
|
||||
// t.Logf("\n%v", part)
|
||||
added, err := partSet2.AddPart(part)
|
||||
if !added || err != nil {
|
||||
t.Errorf("failed to add part %v, error: %v", i, err)
|
||||
|
||||
@@ -39,9 +39,7 @@ func (pvs PrivValidatorsByAddress) Less(i, j int) bool {
|
||||
}
|
||||
|
||||
func (pvs PrivValidatorsByAddress) Swap(i, j int) {
|
||||
it := pvs[i]
|
||||
pvs[i] = pvs[j]
|
||||
pvs[j] = it
|
||||
pvs[i], pvs[j] = pvs[j], pvs[i]
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
|
||||
@@ -708,9 +708,7 @@ func (vals *ValidatorSet) VerifyCommit(chainID string, blockID BlockID,
|
||||
return nil
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// LIGHT CLIENT VERIFICATION METHODS
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// VerifyCommitLight verifies +2/3 of the set had signed the given commit.
|
||||
//
|
||||
@@ -1026,7 +1024,6 @@ func RandValidatorSet(numValidators int, votingPower int64) (*ValidatorSet, []Pr
|
||||
return NewValidatorSet(valz), privValidators
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// safe addition/subtraction/multiplication
|
||||
|
||||
func safeAdd(a, b int64) (int64, bool) {
|
||||
|
||||
@@ -1658,9 +1658,7 @@ func (valz validatorsByPriority) Less(i, j int) bool {
|
||||
}
|
||||
|
||||
func (valz validatorsByPriority) Swap(i, j int) {
|
||||
it := valz[i]
|
||||
valz[i] = valz[j]
|
||||
valz[j] = it
|
||||
valz[i], valz[j] = valz[j], valz[i]
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
@@ -1679,9 +1677,7 @@ func (tvals testValsByVotingPower) Less(i, j int) bool {
|
||||
}
|
||||
|
||||
func (tvals testValsByVotingPower) Swap(i, j int) {
|
||||
it := tvals[i]
|
||||
tvals[i] = tvals[j]
|
||||
tvals[j] = it
|
||||
tvals[i], tvals[j] = tvals[j], tvals[i]
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
|
||||
@@ -220,7 +220,7 @@ func (vote *Vote) ToProto() *tmproto.Vote {
|
||||
}
|
||||
}
|
||||
|
||||
//FromProto converts a proto generetad type to a handwritten type
|
||||
// FromProto converts a proto generetad type to a handwritten type
|
||||
// return type, nil if everything converts safely, otherwise nil, error
|
||||
func VoteFromProto(pv *tmproto.Vote) (*Vote, error) {
|
||||
if pv == nil {
|
||||
|
||||
Reference in New Issue
Block a user