From e503b068b665550a86fe6a0414c8663c865301f5 Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Tue, 14 Sep 2021 14:39:23 +0300 Subject: [PATCH 1/3] .golangci.yml: replace `golint` with `revive` Signed-off-by: Evgeniy Stratonikov --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 39a4d8e51..1c67aa665 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,7 +29,7 @@ linters: enable: # mandatory linters - govet - - golint + - revive # some default golangci-lint linters - deadcode From 176b61e3171e18cf814a9390a5eff066ba8305ed Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Tue, 14 Sep 2021 14:39:39 +0300 Subject: [PATCH 2/3] *: fix linter issues Signed-off-by: Evgeniy Stratonikov --- pkg/core/blockchain.go | 2 +- pkg/core/native/native_neo.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index f2e7e14a1..719af0115 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -96,7 +96,7 @@ var ( ErrPolicy = errors.New("not allowed by policy") // ErrInvalidBlockIndex is returned when trying to add block with index // other than expected height of the blockchain. - ErrInvalidBlockIndex error = errors.New("invalid block index") + ErrInvalidBlockIndex = errors.New("invalid block index") // ErrHasConflicts is returned when trying to add some transaction which // conflicts with other transaction in the chain or pool according to // Conflicts attribute. diff --git a/pkg/core/native/native_neo.go b/pkg/core/native/native_neo.go index 391525f1f..f56914eab 100644 --- a/pkg/core/native/native_neo.go +++ b/pkg/core/native/native_neo.go @@ -212,7 +212,7 @@ func (n *NEO) Initialize(ic *interop.Context) error { } n.mint(ic, h, big.NewInt(NEOTotalSupply), false) - var index uint32 = 0 + var index uint32 value := big.NewInt(5 * GASFactor) err = n.putGASRecord(ic.DAO, index, value) if err != nil { From 31eed060adc375c3c925c518a8b8bc23d80add7d Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Wed, 15 Sep 2021 17:44:41 +0300 Subject: [PATCH 3/3] .circleci: update golangci-lint to v1.42.1 Signed-off-by: Evgeniy Stratonikov --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c025f694b..7613e5b97 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,7 +39,7 @@ jobs: - run: name: go-lint command: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.40.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.1 make lint test_1_15: