Update go to 1.19.3 (#11630)

* Update go to 1.19.3

* Update other items to 1.19

* Update golangci-lint to latest release

* Run gofmt -s with go1.19

* Huge gofmt changes

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
Preston Van Loon
2022-11-18 14:12:19 -05:00
committed by GitHub
parent 07d0a00f88
commit 4b033f4cc7
88 changed files with 1603 additions and 1470 deletions

View File

@@ -53,17 +53,18 @@ func TestStore_UpdateUnrealizedCheckpoints(t *testing.T) {
}
// Epoch 2 | Epoch 3
//
// Epoch 2 | Epoch 3
// |
// C |
// / |
// A <-- B |
// \ |
// ---- D
// |
// C |
// / |
//
// B is the first block that justifies A.
// A <-- B |
//
// \ |
// ---- D
//
// B is the first block that justifies A.
func TestStore_LongFork(t *testing.T) {
f := setup(1, 1)
ctx := context.Background()
@@ -104,18 +105,17 @@ func TestStore_LongFork(t *testing.T) {
require.Equal(t, [32]byte{'c'}, headRoot)
}
// Epoch 1 Epoch 2 Epoch 3
// | |
// | |
//
// A <-- B <-- C <-- D <-- E <-- F <-- G <-- H |
//
// Epoch 1 Epoch 2 Epoch 3
// | |
// | |
// A <-- B <-- C <-- D <-- E <-- F <-- G <-- H |
// | \ |
// | --------------- I
// | |
//
// E justifies A. G justifies E.
// | \ |
// | --------------- I
// | |
//
// E justifies A. G justifies E.
func TestStore_NoDeadLock(t *testing.T) {
f := setup(0, 0)
ctx := context.Background()
@@ -187,17 +187,16 @@ func TestStore_NoDeadLock(t *testing.T) {
require.Equal(t, types.Epoch(1), f.FinalizedCheckpoint().Epoch)
}
// Epoch 1 | Epoch 2
// |
// -- D (late)
// / |
// A <- B <- C |
// \ |
// -- -- -- E <- F <- G <- H
// |
// Epoch 1 | Epoch 2
// |
// -- D (late)
// / |
// A <- B <- C |
// \ |
// -- -- -- E <- F <- G <- H
// |
//
// D justifies and comes late.
//
func TestStore_ForkNextEpoch(t *testing.T) {
resetCfg := features.InitWithReset(&features.Flags{
EnableDefensivePull: true,