Commit c928bb7f authored by 王志文's avatar 王志文 Committed by vipwzw

make commond exec error

parent 738291a2
...@@ -33,6 +33,7 @@ jobs: ...@@ -33,6 +33,7 @@ jobs:
make largefile-check make largefile-check
make checkgofmt && make fmt_go make checkgofmt && make fmt_go
make linter make linter
make
unit-test: unit-test:
name: unit-test name: unit-test
......
...@@ -204,7 +204,7 @@ protobuf: ## Generate protbuf file of types package ...@@ -204,7 +204,7 @@ protobuf: ## Generate protbuf file of types package
@find ./plugin/dapp -maxdepth 2 -type d -name proto -exec make -C {} \; @find ./plugin/dapp -maxdepth 2 -type d -name proto -exec make -C {} \;
depends: ## Generate depends file of types package depends: ## Generate depends file of types package
@find ./plugin/dapp -maxdepth 2 -type d -name cmd -exec make -C {} OUT="$(MKDIR)build/ci" FLAG= \; @find ./plugin/dapp -maxdepth 2 -print -type d -name cmd -exec make -C {} OUT="$(MKDIR)build/ci" FLAG= \;
help: ## Display this help screen help: ## Display this help screen
......
...@@ -17,13 +17,13 @@ require ( ...@@ -17,13 +17,13 @@ require (
github.com/coreos/etcd v3.3.15+incompatible github.com/coreos/etcd v3.3.15+incompatible
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/ethereum/go-ethereum v1.10.0 github.com/ethereum/go-ethereum v1.10.13
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.5.2 github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 github.com/golang/snappy v0.0.4
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/holiman/uint256 v1.1.1 github.com/holiman/uint256 v1.2.0
github.com/huin/goupnp v1.0.2 github.com/huin/goupnp v1.0.2
github.com/jackpal/go-nat-pmp v1.0.2 github.com/jackpal/go-nat-pmp v1.0.2
github.com/mr-tron/base58 v1.2.0 github.com/mr-tron/base58 v1.2.0
......
This diff is collapsed.
...@@ -90,7 +90,7 @@ func TestMethodPack(t *testing.T) { ...@@ -90,7 +90,7 @@ func TestMethodPack(t *testing.T) {
t.Errorf("expected %x got %x", sig, packed) t.Errorf("expected %x got %x", sig, packed)
} }
var addrA, addrB = common.Uint256ToAddress(uint256.NewInt().SetUint64(1)), common.Uint256ToAddress(uint256.NewInt().SetUint64(1)) var addrA, addrB = common.Uint256ToAddress(uint256.NewInt(1)), common.Uint256ToAddress(uint256.NewInt(1))
sig = abi.Methods["sliceAddress"].ID sig = abi.Methods["sliceAddress"].ID
sig = append(sig, common.LeftPadBytes([]byte{32}, 32)...) sig = append(sig, common.LeftPadBytes([]byte{32}, 32)...)
sig = append(sig, common.LeftPadBytes([]byte{2}, 32)...) sig = append(sig, common.LeftPadBytes([]byte{2}, 32)...)
...@@ -105,7 +105,7 @@ func TestMethodPack(t *testing.T) { ...@@ -105,7 +105,7 @@ func TestMethodPack(t *testing.T) {
t.Errorf("expected %x got %x", sig, packed) t.Errorf("expected %x got %x", sig, packed)
} }
var addrC, addrD = common.Uint256ToAddress(uint256.NewInt().SetUint64(3)), common.Uint256ToAddress(uint256.NewInt().SetUint64(4)) var addrC, addrD = common.Uint256ToAddress(uint256.NewInt(3)), common.Uint256ToAddress(uint256.NewInt(4))
sig = abi.Methods["sliceMultiAddress"].ID sig = abi.Methods["sliceMultiAddress"].ID
sig = append(sig, common.LeftPadBytes([]byte{64}, 32)...) sig = append(sig, common.LeftPadBytes([]byte{64}, 32)...)
sig = append(sig, common.LeftPadBytes([]byte{160}, 32)...) sig = append(sig, common.LeftPadBytes([]byte{160}, 32)...)
......
...@@ -422,7 +422,7 @@ func opExtCodeHash(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) { ...@@ -422,7 +422,7 @@ func opExtCodeHash(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) {
// 获取当前区块的GasPrice // 获取当前区块的GasPrice
func opGasprice(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) { func opGasprice(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) {
v := uint256.NewInt().SetUint64(uint64(evm.GasPrice)) v := uint256.NewInt(uint64(evm.GasPrice))
callContext.stack.push(v) callContext.stack.push(v)
return nil, nil return nil, nil
} }
...@@ -954,7 +954,7 @@ func makeSwap(size int64) executionFunc { ...@@ -954,7 +954,7 @@ func makeSwap(size int64) executionFunc {
// 获取自身余额 // 获取自身余额
func opSelfBalance(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) { func opSelfBalance(pc *uint64, evm *EVM, callContext *callCtx) ([]byte, error) {
balance := uint256.NewInt().SetUint64(evm.StateDB.GetBalance(callContext.contract.Address().String())) balance := uint256.NewInt(evm.StateDB.GetBalance(callContext.contract.Address().String()))
callContext.stack.push(balance) callContext.stack.push(balance)
return nil, nil return nil, nil
} }
......
...@@ -574,11 +574,11 @@ func BenchmarkOpSHA3(bench *testing.B) { ...@@ -574,11 +574,11 @@ func BenchmarkOpSHA3(bench *testing.B) {
//env.interpreter = evmInterpreter //env.interpreter = evmInterpreter
mem.Resize(32) mem.Resize(32)
pc := uint64(0) pc := uint64(0)
start := uint256.NewInt() start := uint256.NewInt(0)
bench.ResetTimer() bench.ResetTimer()
for i := 0; i < bench.N; i++ { for i := 0; i < bench.N; i++ {
stack.pushN(*uint256.NewInt().SetUint64(32), *start) stack.pushN(*uint256.NewInt(32), *start)
opSha3(&pc, env, &callCtx{mem, stack, nil}) opSha3(&pc, env, &callCtx{mem, stack, nil})
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment