mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Clean up various warnings (#10710)
* Clean up various warnings * Update beacon-chain/rpc/prysm/v1alpha1/debug/state_test.go Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * Fix redundant casting genState Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
This commit is contained in:
@@ -13,14 +13,14 @@ func TestCommitteeIndex_Casting(t *testing.T) {
|
||||
t.Errorf("Unequal: %v = %v", CommitteeIndex(x1), committeeIdx)
|
||||
}
|
||||
|
||||
var x2 float64 = 42.2
|
||||
var x2 = 42.2
|
||||
if CommitteeIndex(x2) != committeeIdx {
|
||||
t.Errorf("Unequal: %v = %v", CommitteeIndex(x2), committeeIdx)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("int", func(t *testing.T) {
|
||||
var x int = 42
|
||||
var x = 42
|
||||
if CommitteeIndex(x) != committeeIdx {
|
||||
t.Errorf("Unequal: %v = %v", CommitteeIndex(x), committeeIdx)
|
||||
}
|
||||
|
||||
@@ -25,14 +25,14 @@ func TestSlot_Casting(t *testing.T) {
|
||||
t.Errorf("Unequal: %v = %v", types.Slot(x1), slot)
|
||||
}
|
||||
|
||||
var x2 float64 = 42.2
|
||||
var x2 = 42.2
|
||||
if types.Slot(x2) != slot {
|
||||
t.Errorf("Unequal: %v = %v", types.Slot(x2), slot)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("int", func(t *testing.T) {
|
||||
var x int = 42
|
||||
var x = 42
|
||||
if types.Slot(x) != slot {
|
||||
t.Errorf("Unequal: %v = %v", types.Slot(x), slot)
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ func TestValidatorIndex_Casting(t *testing.T) {
|
||||
t.Errorf("Unequal: %v = %v", ValidatorIndex(x1), valIdx)
|
||||
}
|
||||
|
||||
var x2 float64 = 42.2
|
||||
var x2 = 42.2
|
||||
if ValidatorIndex(x2) != valIdx {
|
||||
t.Errorf("Unequal: %v = %v", ValidatorIndex(x2), valIdx)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("int", func(t *testing.T) {
|
||||
var x int = 42
|
||||
var x = 42
|
||||
if ValidatorIndex(x) != valIdx {
|
||||
t.Errorf("Unequal: %v = %v", ValidatorIndex(x), valIdx)
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ func TestBellatrixBeaconBlock_IsNil(t *testing.T) {
|
||||
assert.Equal(t, false, wb.IsNil())
|
||||
}
|
||||
|
||||
func TesTBellatrixBeaconBlock_IsBlinded(t *testing.T) {
|
||||
func TestBellatrixBeaconBlock_IsBlinded(t *testing.T) {
|
||||
wsb, err := wrapper.WrappedBeaconBlock(ðpb.BeaconBlockBellatrix{})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, false, wsb.IsNil())
|
||||
|
||||
Reference in New Issue
Block a user