chore: add fmt vet (#3)

This commit is contained in:
Anton Shchukin 2018-05-27 17:42:13 +03:00 committed by GitHub
parent 4c2ebb039d
commit ec7570c838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -144,3 +144,12 @@ geth-windows-amd64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/geth
@echo "Windows amd64 cross compilation done:" @echo "Windows amd64 cross compilation done:"
@ls -ld $(GOBIN)/geth-windows-* | grep amd64 @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)

View file

@ -580,7 +580,7 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
return ErrInvalidSender 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") return errors.New("SONM sidechain rule #1: you are not prepare uranus, creation contracts not allowed")
} }