Fix build issue

pull/1806/head
Rongjian Lan 5 years ago
parent 6dbfcf1d65
commit a41a4a1216
  1. 31
      go.mod
  2. 9
      node/worker/worker.go

@ -4,29 +4,33 @@ go 1.12
require ( require (
github.com/Workiva/go-datastructures v1.0.50 github.com/Workiva/go-datastructures v1.0.50
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect github.com/allegro/bigcache v1.2.1 // indirect
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect github.com/aristanetworks/goarista v0.0.0-20190607111240-52c2a7864a08 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d
github.com/cespare/cp v1.1.1 github.com/cespare/cp v1.1.1
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/deckarep/golang-set v1.7.1 github.com/deckarep/golang-set v1.7.1
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/ethereum/go-ethereum v1.8.27 github.com/ethereum/go-ethereum v1.8.27
github.com/fatih/color v1.7.0 github.com/fatih/color v1.7.0
github.com/fjl/memsize v0.0.0-20180929194037-2a09253e352a github.com/fjl/memsize v0.0.0-20180929194037-2a09253e352a
github.com/garslo/gogen v0.0.0-20170307003452-d6ebae628c7c // indirect
github.com/golang/mock v1.3.1 github.com/golang/mock v1.3.1
github.com/golang/protobuf v1.3.2 github.com/golang/protobuf v1.3.1
github.com/golangci/golangci-lint v1.17.1 github.com/golangci/golangci-lint v1.17.1
github.com/gorilla/handlers v1.4.0 github.com/gorilla/handlers v1.4.0
github.com/gorilla/mux v1.7.2 github.com/gorilla/mux v1.7.2
github.com/harmony-ek/gencodec v0.0.0-20190215044613-e6740dbdd846 github.com/harmony-ek/gencodec v0.0.0-20190215044613-e6740dbdd846
github.com/harmony-one/bls v0.0.5 github.com/harmony-one/bls v0.0.5
github.com/harmony-one/go-sdk v0.0.0-20191105223634-37bdcedd4a9d
github.com/harmony-one/taggedrlp v0.1.2 github.com/harmony-one/taggedrlp v0.1.2
github.com/harmony-one/vdf v1.0.0 github.com/harmony-one/vdf v0.0.0-20190924175951-620379da8849
github.com/hashicorp/golang-lru v0.5.3 github.com/hashicorp/golang-lru v0.5.1
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365
github.com/ipfs/go-ds-badger v0.0.5 github.com/ipfs/go-ds-badger v0.0.5
github.com/ipfs/go-log v0.0.1 github.com/ipfs/go-log v0.0.1
github.com/karalabe/hid v1.0.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/libp2p/go-libp2p v0.3.1 github.com/libp2p/go-libp2p v0.3.1
github.com/libp2p/go-libp2p-core v0.2.2 github.com/libp2p/go-libp2p-core v0.2.2
github.com/libp2p/go-libp2p-crypto v0.1.0 github.com/libp2p/go-libp2p-crypto v0.1.0
@ -42,18 +46,27 @@ require (
github.com/natefinch/lumberjack v2.0.0+incompatible github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/pborman/uuid v1.2.0 github.com/pborman/uuid v1.2.0
github.com/pkg/errors v0.8.1 github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v1.1.0 github.com/prometheus/client_golang v0.9.2
github.com/prometheus/common v0.4.1 // indirect
github.com/prometheus/procfs v0.0.3 // indirect
github.com/rjeczalik/notify v0.9.2 github.com/rjeczalik/notify v0.9.2
github.com/rs/cors v1.7.0 // indirect
github.com/rs/zerolog v1.14.3 github.com/rs/zerolog v1.14.3
github.com/shirou/gopsutil v2.18.12+incompatible github.com/shirou/gopsutil v2.18.12+incompatible
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
github.com/spf13/cobra v0.0.5 github.com/spf13/cobra v0.0.5
github.com/stretchr/testify v1.3.0 github.com/stretchr/testify v1.3.0
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83 golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 golang.org/x/lint v0.0.0-20190409202823-959b441ac422
golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3 // indirect
golang.org/x/tools v0.0.0-20190924052046-3ac2a5bbd98a golang.org/x/tools v0.0.0-20190924052046-3ac2a5bbd98a
google.golang.org/grpc v1.23.1 google.golang.org/appengine v1.4.0 // indirect
google.golang.org/grpc v1.22.0
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
gopkg.in/ini.v1 v1.42.0 gopkg.in/ini.v1 v1.42.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
) )

@ -5,7 +5,7 @@ import (
"math/big" "math/big"
"time" "time"
"github.com/harmony-one/go-sdk/pkg/address" common2 "github.com/harmony-one/harmony/internal/common"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rlp"
@ -141,20 +141,21 @@ func (w *Worker) CommitTransactions(pendingNormal map[common.Address]types.Trans
} }
logs, err := w.commitTransaction(tx, coinbase) logs, err := w.commitTransaction(tx, coinbase)
sender, _ := common2.AddressToBech32(from)
switch err { switch err {
case core.ErrGasLimitReached: case core.ErrGasLimitReached:
// Pop the current out-of-gas transaction without shifting in the next from the account // Pop the current out-of-gas transaction without shifting in the next from the account
utils.Logger().Info().Str("sender", address.ToBech32(from)).Msg("Gas limit exceeded for current block") utils.Logger().Info().Str("sender", sender).Msg("Gas limit exceeded for current block")
txs.Pop() txs.Pop()
case core.ErrNonceTooLow: case core.ErrNonceTooLow:
// New head notification data race between the transaction pool and miner, shift // New head notification data race between the transaction pool and miner, shift
utils.Logger().Info().Str("sender", address.ToBech32(from)).Uint64("nonce", tx.Nonce()).Msg("Skipping transaction with low nonce") utils.Logger().Info().Str("sender", sender).Uint64("nonce", tx.Nonce()).Msg("Skipping transaction with low nonce")
txs.Shift() txs.Shift()
case core.ErrNonceTooHigh: case core.ErrNonceTooHigh:
// Reorg notification data race between the transaction pool and miner, skip account = // Reorg notification data race between the transaction pool and miner, skip account =
utils.Logger().Info().Str("sender", address.ToBech32(from)).Uint64("nonce", tx.Nonce()).Msg("Skipping account with high nonce") utils.Logger().Info().Str("sender", sender).Uint64("nonce", tx.Nonce()).Msg("Skipping account with high nonce")
txs.Pop() txs.Pop()
case nil: case nil:

Loading…
Cancel
Save