aboutsummaryrefslogtreecommitdiff
path: root/eth/backend.go
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-08-30 09:00:43 -0400
committerDeterminant <[email protected]>2019-08-30 09:00:43 -0400
commit0424afc658dae706b017aeb3d6208026c1f6f547 (patch)
treecae1127d880fbe8ea5454821d330dc9acc4ed112 /eth/backend.go
parentbf3776a5d5475f9ee35820099debfc49d71ea10c (diff)
add callbacks for the miner
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go4
1 files changed, 2 insertions, 2 deletions
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}