fix unit tests

This commit is contained in:
Tuna 2018-09-06 10:45:10 +07:00
parent 4a93b33256
commit 4ceb65f9a5
2 changed files with 65 additions and 62 deletions

View file

@ -27,6 +27,7 @@ import (
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/consensus/posv"
"github.com/ethereum/go-ethereum/console"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/eth"
@ -293,6 +294,7 @@ func startNode(ctx *cli.Context, stack *node.Node, cfg tomoConfig) {
if err := stack.Service(&ethereum); err != nil {
utils.Fatalf("Ethereum service not running: %v", err)
}
if _, ok := ethereum.Engine().(*posv.Posv); ok {
go func() {
started := false
ok, err := ethereum.ValidateStaker()
@ -363,3 +365,4 @@ func startNode(ctx *cli.Context, stack *node.Node, cfg tomoConfig) {
}
}()
}
}