forked from cerc-io/plugeth
chain, tests/helper, vm: make tests compile
They were broken by df5603de0a
, when vm.Log became ethstate.Log.
This commit is contained in:
parent
b95d9e005d
commit
394e0f60c2
@ -3,12 +3,14 @@ package chain
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/vm"
|
"github.com/ethereum/go-ethereum/state"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBloom9(t *testing.T) {
|
func TestBloom9(t *testing.T) {
|
||||||
testCase := []byte("testtest")
|
testCase := []byte("testtest")
|
||||||
bin := LogsBloom([]vm.Log{vm.Log{testCase, [][]byte{[]byte("hellohello")}, nil}}).Bytes()
|
bin := LogsBloom([]state.Log{
|
||||||
|
{testCase, [][]byte{[]byte("hellohello")}, nil},
|
||||||
|
}).Bytes()
|
||||||
res := BloomLookup(bin, testCase)
|
res := BloomLookup(bin, testCase)
|
||||||
|
|
||||||
if !res {
|
if !res {
|
||||||
|
@ -50,7 +50,7 @@ func (self *Env) Difficulty() *big.Int { return self.difficulty }
|
|||||||
func (self *Env) BlockHash() []byte { return nil }
|
func (self *Env) BlockHash() []byte { return nil }
|
||||||
func (self *Env) State() *state.State { return self.state }
|
func (self *Env) State() *state.State { return self.state }
|
||||||
func (self *Env) GasLimit() *big.Int { return self.gasLimit }
|
func (self *Env) GasLimit() *big.Int { return self.gasLimit }
|
||||||
func (self *Env) AddLog(vm.Log) {}
|
func (self *Env) AddLog(state.Log) {}
|
||||||
func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error {
|
func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error {
|
||||||
return vm.Transfer(from, to, amount)
|
return vm.Transfer(from, to, amount)
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ func (TestEnv) Time() int64 { return 0 }
|
|||||||
func (TestEnv) GasLimit() *big.Int { return nil }
|
func (TestEnv) GasLimit() *big.Int { return nil }
|
||||||
func (TestEnv) Difficulty() *big.Int { return nil }
|
func (TestEnv) Difficulty() *big.Int { return nil }
|
||||||
func (TestEnv) Value() *big.Int { return nil }
|
func (TestEnv) Value() *big.Int { return nil }
|
||||||
func (TestEnv) AddLog(Log) {}
|
func (TestEnv) AddLog(state.Log) {}
|
||||||
|
|
||||||
func (TestEnv) Transfer(from, to Account, amount *big.Int) error {
|
func (TestEnv) Transfer(from, to Account, amount *big.Int) error {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user