cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacks
This commit is contained in:
@ -34,6 +34,8 @@ import (
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/eth"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/event"
|
||||
"github.com/ethereum/go-ethereum/node"
|
||||
xe "github.com/ethereum/go-ethereum/xeth"
|
||||
)
|
||||
|
||||
@ -146,13 +148,11 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) {
|
||||
}
|
||||
|
||||
// only use minimalistic stack with no networking
|
||||
return eth.New(ð.Config{
|
||||
DataDir: tmp,
|
||||
return eth.New(&node.ServiceContext{EventMux: new(event.TypeMux)}, ð.Config{
|
||||
AccountManager: am,
|
||||
Etherbase: common.HexToAddress(testAddress),
|
||||
MaxPeers: 0,
|
||||
PowTest: true,
|
||||
NewDB: func(path string) (ethdb.Database, error) { return db, nil },
|
||||
TestGenesisState: db,
|
||||
GpoMinGasPrice: common.Big1,
|
||||
GpobaseCorrectionFactor: 1,
|
||||
GpoMaxGasPrice: common.Big1,
|
||||
@ -166,7 +166,7 @@ func testInit(t *testing.T) (self *testFrontend) {
|
||||
t.Errorf("error creating ethereum: %v", err)
|
||||
return
|
||||
}
|
||||
err = ethereum.Start()
|
||||
err = ethereum.Start(nil)
|
||||
if err != nil {
|
||||
t.Errorf("error starting ethereum: %v", err)
|
||||
return
|
||||
@ -174,7 +174,7 @@ func testInit(t *testing.T) (self *testFrontend) {
|
||||
|
||||
// mock frontend
|
||||
self = &testFrontend{t: t, ethereum: ethereum}
|
||||
self.xeth = xe.New(ethereum, self)
|
||||
self.xeth = xe.New(nil, self)
|
||||
self.wait = self.xeth.UpdateState()
|
||||
addr, _ := self.ethereum.Etherbase()
|
||||
|
||||
|
Reference in New Issue
Block a user