From 35a978721a110682badbfd68ab472b24c86821b0 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Wed, 1 Mar 2023 18:03:29 +0530 Subject: [PATCH] bump : go version from 1.19 to 1.20.1 --- .github/workflows/ci.yml | 2 +- .github/workflows/packager.yml | 2 +- .github/workflows/release.yml | 2 +- Makefile | 2 +- core/blockchain.go | 3 +++ go.mod | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5bb62a8bb..9e1e4ad0d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: 1.19.x + go-version: 1.20.x - name: Install dependencies on Linux if: runner.os == 'Linux' diff --git a/.github/workflows/packager.yml b/.github/workflows/packager.yml index 7485aca976..bb2c00b4c0 100644 --- a/.github/workflows/packager.yml +++ b/.github/workflows/packager.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@master with: - go-version: 1.19 + go-version: 1.20 - name: Adding TAG to ENV run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ceda3d2ee..41c6ba47b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@master with: - go-version: 1.19.x + go-version: 1.20.x - name: Prepare id: prepare diff --git a/Makefile b/Makefile index 242435df76..f8307efda0 100644 --- a/Makefile +++ b/Makefile @@ -196,7 +196,7 @@ geth-windows-amd64: @ls -ld $(GOBIN)/geth-windows-* | grep amd64 PACKAGE_NAME := github.com/maticnetwork/bor -GOLANG_CROSS_VERSION ?= v1.19.1 +GOLANG_CROSS_VERSION ?= v1.20.1 .PHONY: release-dry-run release-dry-run: diff --git a/core/blockchain.go b/core/blockchain.go index cbcf02fef4..fed1d04268 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -1363,6 +1363,7 @@ func (bc *BlockChain) WriteBlockAndSetHead(block *types.Block, receipts []*types // the chain mutex to be held. func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state *state.StateDB, emitHeadEvent bool) (status WriteStatus, err error) { var stateSyncLogs []*types.Log + if stateSyncLogs, err = bc.writeBlockWithState(block, receipts, logs, state); err != nil { return NonStatTy, err } @@ -1371,6 +1372,7 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types if err != nil { return NonStatTy, err } + if reorg { // Reorganise the chain if the parent is not the head block if block.ParentHash() != currentBlock.Hash() { @@ -1378,6 +1380,7 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types return NonStatTy, err } } + status = CanonStatTy } else { status = SideStatTy diff --git a/go.mod b/go.mod index f55b2f9aa7..4015d41bfe 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ethereum/go-ethereum -go 1.19 +go 1.20 require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0