aboutsummaryrefslogtreecommitdiffstats
path: root/internal/ethapi/tracer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/ethapi/tracer_test.go')
-rw-r--r--internal/ethapi/tracer_test.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/internal/ethapi/tracer_test.go b/internal/ethapi/tracer_test.go
index 301ff4840..577b426f1 100644
--- a/internal/ethapi/tracer_test.go
+++ b/internal/ethapi/tracer_test.go
@@ -26,11 +26,13 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
+ "github.com/ethereum/go-ethereum/params"
)
type ruleSet struct{}
-func (self *ruleSet) IsHomestead(*big.Int) bool { return true }
+func (self *ruleSet) IsHomestead(*big.Int) bool { return true }
+func (*ruleSet) GasTable(*big.Int) params.GasTable { return params.GasTableHomesteadGasRepriceFork }
type Env struct {
gasLimit *big.Int
@@ -50,14 +52,14 @@ func (self *Env) Origin() common.Address { return common.Address{} }
func (self *Env) BlockNumber() *big.Int { return big.NewInt(0) }
//func (self *Env) PrevHash() []byte { return self.parent }
-func (self *Env) Coinbase() common.Address { return common.Address{} }
-func (self *Env) MakeSnapshot() vm.Database { return nil }
-func (self *Env) SetSnapshot(vm.Database) {}
-func (self *Env) Time() *big.Int { return big.NewInt(time.Now().Unix()) }
-func (self *Env) Difficulty() *big.Int { return big.NewInt(0) }
-func (self *Env) Db() vm.Database { return nil }
-func (self *Env) GasLimit() *big.Int { return self.gasLimit }
-func (self *Env) VmType() vm.Type { return vm.StdVmTy }
+func (self *Env) Coinbase() common.Address { return common.Address{} }
+func (self *Env) SnapshotDatabase() int { return 0 }
+func (self *Env) RevertToSnapshot(int) {}
+func (self *Env) Time() *big.Int { return big.NewInt(time.Now().Unix()) }
+func (self *Env) Difficulty() *big.Int { return big.NewInt(0) }
+func (self *Env) Db() vm.Database { return nil }
+func (self *Env) GasLimit() *big.Int { return self.gasLimit }
+func (self *Env) VmType() vm.Type { return vm.StdVmTy }
func (self *Env) GetHash(n uint64) common.Hash {
return common.BytesToHash(crypto.Keccak256([]byte(big.NewInt(int64(n)).String())))
}
@@ -93,7 +95,7 @@ func (account) SetNonce(uint64) {}
func (account) Balance() *big.Int { return nil }
func (account) Address() common.Address { return common.Address{} }
func (account) ReturnGas(*big.Int, *big.Int) {}
-func (account) SetCode([]byte) {}
+func (account) SetCode(common.Hash, []byte) {}
func (account) ForEachStorage(cb func(key, value common.Hash) bool) {}
func runTrace(tracer *JavascriptTracer) (interface{}, error) {