From 0424afc658dae706b017aeb3d6208026c1f6f547 Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 30 Aug 2019 09:00:43 -0400 Subject: add callbacks for the miner --- eth/backend.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eth') diff --git a/eth/backend.go b/eth/backend.go index 5fb5728..666f0fb 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -116,7 +116,7 @@ func (s *Ethereum) SetContractBackend(backend bind.ContractBackend) { // New creates a new Ethereum object (including the // initialisation of the common Ethereum object) -func New(ctx *node.ServiceContext, config *Config, cb *dummy.ConsensusCallbacks) (*Ethereum, error) { +func New(ctx *node.ServiceContext, config *Config, cb *dummy.ConsensusCallbacks, mcb *miner.MinerCallbacks) (*Ethereum, error) { // Ensure configuration values are compatible and sane if config.SyncMode == downloader.LightSync { return nil, errors.New("can't run eth.Ethereum in light sync mode, use les.LightEthereum") @@ -214,7 +214,7 @@ func New(ctx *node.ServiceContext, config *Config, cb *dummy.ConsensusCallbacks) if eth.protocolManager, err = NewProtocolManager(chainConfig, checkpoint, config.SyncMode, config.NetworkId, eth.eventMux, eth.txPool, eth.engine, eth.blockchain, chainDb, cacheLimit, config.Whitelist); err != nil { return nil, err } - eth.miner = miner.New(eth, &config.Miner, chainConfig, eth.EventMux(), eth.engine, eth.isLocalBlock) + eth.miner = miner.New(eth, &config.Miner, chainConfig, eth.EventMux(), eth.engine, eth.isLocalBlock, mcb) eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) eth.APIBackend = &EthAPIBackend{ctx.ExtRPCEnabled(), eth, nil} -- cgit v1.2.3