mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
FIX-IMPORT-CYCLE
This commit is contained in:
parent
5f79d00d04
commit
38975a48d4
1 changed files with 32 additions and 32 deletions
|
|
@ -28,8 +28,9 @@ 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/common"
|
||||
"github.com/ethereum/go-ethereum/console"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/eth"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/ethereum/go-ethereum/internal/debug"
|
||||
|
|
@ -46,7 +47,8 @@ const (
|
|||
var (
|
||||
// Git SHA1 commit hash of the release (set via linker flags)
|
||||
gitCommit = ""
|
||||
|
||||
// Ethereum address of the Geth release oracle.
|
||||
relOracle = common.HexToAddress("0xfa7b9770ca4cb04296cac84f37736d4041251cdf")
|
||||
// The app that holds all commands and flags.
|
||||
app = utils.NewApp(gitCommit, "the go-ethereum command line interface")
|
||||
// flags that configure the node
|
||||
|
|
@ -289,7 +291,6 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
|||
if err := stack.Service(ðereum); err != nil {
|
||||
utils.Fatalf("Ethereum service not running: %v", err)
|
||||
}
|
||||
|
||||
go func() {
|
||||
started := false
|
||||
ok, err := ethereum.ValidateMiner()
|
||||
|
|
@ -315,10 +316,10 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
|||
started = true
|
||||
log.Info("Enabled mining node!!!")
|
||||
}
|
||||
defer close(core.Checkpoint)
|
||||
|
||||
for {
|
||||
if ethereum.Checkpoint() {
|
||||
//Checkpoint!!! It's time to reconcile node's state...
|
||||
for range core.Checkpoint {
|
||||
log.Info("Checkpoint!!! It's time to reconcile node's state...")
|
||||
ok, err := ethereum.ValidateMiner()
|
||||
if err != nil {
|
||||
utils.Fatalf("Can't verify validator permission: %v", err)
|
||||
|
|
@ -350,7 +351,6 @@ func startNode(ctx *cli.Context, stack *node.Node) {
|
|||
log.Info("Enabled mining node!!!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue