From 841b2b7225a9318718c3c856a9debdf01bc4f061 Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 26 Sep 2019 22:34:43 -0400 Subject: update examples --- cmd/utils/flags.go | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'cmd/utils') diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 683c490..ea3ca1d 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -29,12 +29,16 @@ import ( "strings" "time" + "github.com/ava-labs/coreth/consensus/dummy" + "github.com/ava-labs/coreth/eth" + "github.com/ava-labs/coreth/ethstats" + "github.com/ava-labs/coreth/miner" + "github.com/ava-labs/coreth/node" "github.com/ava-labs/go-ethereum/accounts" "github.com/ava-labs/go-ethereum/accounts/keystore" "github.com/ava-labs/go-ethereum/common" "github.com/ava-labs/go-ethereum/common/fdlimit" "github.com/ava-labs/go-ethereum/consensus" - "github.com/ava-labs/coreth/consensus/dummy" "github.com/ava-labs/go-ethereum/consensus/clique" "github.com/ava-labs/go-ethereum/consensus/ethash" "github.com/ava-labs/go-ethereum/core" @@ -43,15 +47,11 @@ import ( "github.com/ava-labs/go-ethereum/dashboard" "github.com/ava-labs/go-ethereum/eth/downloader" "github.com/ava-labs/go-ethereum/eth/gasprice" - "github.com/ava-labs/coreth/eth" "github.com/ava-labs/go-ethereum/ethdb" - "github.com/ava-labs/coreth/ethstats" "github.com/ava-labs/go-ethereum/graphql" "github.com/ava-labs/go-ethereum/log" "github.com/ava-labs/go-ethereum/metrics" "github.com/ava-labs/go-ethereum/metrics/influxdb" - "github.com/ava-labs/coreth/miner" - "github.com/ava-labs/coreth/node" "github.com/ava-labs/go-ethereum/p2p" "github.com/ava-labs/go-ethereum/p2p/discv5" "github.com/ava-labs/go-ethereum/p2p/enode" @@ -1477,21 +1477,21 @@ func SetDashboardConfig(ctx *cli.Context, cfg *dashboard.Config) { // RegisterEthService adds an Ethereum client to the stack. func RegisterEthService(stack *node.Node, cfg *eth.Config) { - var err error - if cfg.SyncMode == downloader.LightSync { - panic("not supported") - } else { - err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { - fullNode, err := eth.New(ctx, cfg, &dummy.ConsensusCallbacks{}) - if fullNode != nil && cfg.LightServ > 0 { - panic("not supported") - } - return fullNode, err - }) - } - if err != nil { - Fatalf("Failed to register the Ethereum service: %v", err) - } + var err error + if cfg.SyncMode == downloader.LightSync { + panic("not supported") + } else { + err = stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { + fullNode, err := eth.New(ctx, cfg, &dummy.ConsensusCallbacks{}, &miner.MinerCallbacks{}, nil) + if fullNode != nil && cfg.LightServ > 0 { + panic("not supported") + } + return fullNode, err + }) + } + if err != nil { + Fatalf("Failed to register the Ethereum service: %v", err) + } } // RegisterDashboardService adds a dashboard to the stack. -- cgit v1.2.3-70-g09d2