diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index b7c93cf479a9..7b786d832c38 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -160,12 +160,6 @@ func NewSimulatedBackend(alloc core.GenesisAlloc) *SimulatedBackend { return backend } -// Close terminates the underlying blockchain's update loop. -func (b *SimulatedBackend) Close() error { - b.blockchain.Stop() - return nil -} - // Commit imports all the pending transactions as a single block and starts a // fresh new state. func (b *SimulatedBackend) Commit() { diff --git a/core/error.go b/core/error.go index d9e7e4395baa..a8ebdf88046d 100644 --- a/core/error.go +++ b/core/error.go @@ -65,9 +65,6 @@ var ( // is higher than the balance of the user's account. ErrInsufficientFunds = errors.New("insufficient funds for gas * price + value") - // ErrGasOverflow is returned when calculating gas usage. - ErrGasOverflow = errors.New("gas overflow") - // ErrIntrinsicGas is returned if the transaction is specified to use less gas // than required to start the invocation. ErrIntrinsicGas = errors.New("intrinsic gas too low") @@ -84,10 +81,6 @@ var ( // ErrGasUintOverflow is returned when calculating gas usage. ErrGasUintOverflow = errors.New("gas uint64 overflow") - - // ErrInsufficientIntrinsicGas is returned when the gas limit speicified in transaction - // is not enought to cover intrinsic gas usage. - ErrInsufficientIntrinsicGas = errors.New("insufficient intrinsic gas") ) type ConsensusError struct { diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 93545590fdad..eaabc1a76ec6 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -17,22 +17,15 @@ package vm import ( - "math/big" "sync/atomic" "github.com/XinFinOrg/XDPoSChain/common" - "github.com/XinFinOrg/XDPoSChain/common/math" "github.com/XinFinOrg/XDPoSChain/core/types" "github.com/XinFinOrg/XDPoSChain/params" "github.com/holiman/uint256" "golang.org/x/crypto/sha3" ) -var ( - bigZero = new(big.Int) - tt255 = math.BigPow(2, 255) -) - func opAdd(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) { x, y := scope.Stack.pop(), scope.Stack.peek() y.Add(&x, y) diff --git a/core/vm/logger.go b/core/vm/logger.go index 9e82826b2e9c..e8294e3d674a 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -18,7 +18,6 @@ package vm import ( "encoding/hex" - "errors" "fmt" "io" "math/big" @@ -33,8 +32,6 @@ import ( "github.com/holiman/uint256" ) -var errTraceLimitReached = errors.New("the number of logs reached the specified limit") - // Storage represents a contract's storage. type Storage map[common.Hash]common.Hash