diff --git a/accounts/usbwallet/trezor.go b/accounts/usbwallet/trezor.go index 2dda511046..c2f4cd1e08 100644 --- a/accounts/usbwallet/trezor.go +++ b/accounts/usbwallet/trezor.go @@ -25,7 +25,6 @@ import ( "errors" "fmt" "io" - "math" "math/big" "github.com/ethereum/go-ethereum/accounts" @@ -309,7 +308,7 @@ func (w *trezorDriver) trezorExchange(req proto.Message, results ...proto.Messag var payload []byte - if 8+len(data) < math.MaxInt { + if 8+len(data) < 64*1024*1024 { payload = make([]byte, 8+len(data)) } diff --git a/core/vm/contract.go b/core/vm/contract.go index 38882543c1..d7cbafcf7f 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -17,7 +17,6 @@ package vm import ( - "math" "math/big" "github.com/ethereum/go-ethereum/common" @@ -147,7 +146,7 @@ func (c *Contract) AsDelegate() *Contract { // GetOp returns the n'th element in the contract's byte array func (c *Contract) GetOp(n uint64) OpCode { - if len(c.Code) > 0 && len(c.Code) <= math.MaxUint16 && n < uint64(len(c.Code)) { + if len(c.Code) > 0 && len(c.Code) <= 64*1024*1024 && n < uint64(len(c.Code)) { return OpCode(c.Code[n]) }