diff --git a/Makefile b/Makefile index 3922d6015b..c9c2d11b2e 100644 --- a/Makefile +++ b/Makefile @@ -144,3 +144,12 @@ geth-windows-amd64: build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth @echo "Windows amd64 cross compilation done:" @ls -ld $(GOBIN)/geth-windows-* | grep amd64 + +vet: + @echo "+ $@" + @go tool vet $(shell ls -1 -d */ | grep -v -e vendor -e contracts) + +fmt: + @echo "+ $@" + @test -z "$$(gofmt -s -l . 2>&1 | grep -v ^vendor/ | tee /dev/stderr)" || \ + (echo >&2 "+ please format Go code with 'gofmt -s'" && false) diff --git a/core/tx_pool.go b/core/tx_pool.go index 3207c89999..61c4d74833 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -107,7 +107,7 @@ var ( type TxStatus uint const ( - TxStatusUnknown TxStatus = iota + TxStatusUnknown TxStatus = iota TxStatusQueued TxStatusPending TxStatusIncluded @@ -580,7 +580,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { return ErrInvalidSender } - if tx.To() == nil && from.Hex() != pool.superheroAddress.Hex(){ + if tx.To() == nil && from.Hex() != pool.superheroAddress.Hex() { return errors.New("SONM sidechain rule #1: you are not prepare uranus, creation contracts not allowed") }