Merge pull request #3693 from AlexiaChen/upgrade-go-version

[golang] upgrade to 1.16
pull/3699/head
Rongjian Lan 4 years ago committed by GitHub
commit d4f48df8e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .travis.yml
  2. 2
      Dockerfile
  3. 2
      README.md
  4. 3
      core/rawdb/accessors_offchain.go
  5. 2
      go.mod
  6. 2
      rosetta/infra/Dockerfile
  7. 2
      scripts/travis_go_checker.sh

@ -2,7 +2,7 @@ os: linux
dist: bionic
language: go
go:
- 1.14
- 1.16
go_import_path: github.com/harmony-one/harmony
cache:
directories:

@ -13,7 +13,7 @@ ENV BLS_DIR=${HMY_PATH}/bls
ENV CGO_CFLAGS="-I${BLS_DIR}/include -I${MCL_DIR}/include"
ENV CGO_LDFLAGS="-L${BLS_DIR}/lib"
ENV LD_LIBRARY_PATH=${BLS_DIR}/lib:${MCL_DIR}/lib
ENV GIMME_GO_VERSION="1.14.1"
ENV GIMME_GO_VERSION="1.16.3"
ENV PATH="/root/bin:${PATH}"
RUN apt-get update -y

@ -16,7 +16,7 @@ http://api.hmny.io/
## Requirements
### **Go 1.14.7**
### **Go 1.16.3**
### **GMP and OpenSSL**
On macOS:

@ -1,6 +1,7 @@
package rawdb
import (
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common"
@ -301,7 +302,7 @@ func ReadBlockCommitSig(db DatabaseReader, blockNum uint64) ([]byte, error) {
// this is only needed for the compatibility in the migration moment.
data, err = db.Get(lastCommitsKey)
if err != nil {
return nil, errors.New("cannot read commit sig for block " + string(blockNum))
return nil, errors.New(fmt.Sprintf("cannot read commit sig for block: %d ", blockNum))
}
}
return data, nil

@ -1,6 +1,6 @@
module github.com/harmony-one/harmony
go 1.14
go 1.16
require (
github.com/VictoriaMetrics/fastcache v1.5.7 // indirect

@ -1,5 +1,5 @@
# Build
FROM golang:1.14 AS build
FROM golang:1.16 AS build
RUN apt update -y && \
apt install libgmp-dev libssl-dev git -y && \

@ -80,6 +80,8 @@ else
fi
echo "Running go test..."
# Fix https://github.com/golang/go/issues/44129#issuecomment-788351567
go get -t ./...
if go test -v -count=1 ./...
then
echo "go test succeeded."

Loading…
Cancel
Save