fetcher-hotfix

This commit is contained in:
MestryOmkar 2019-03-02 15:10:35 +05:30
parent 10694b2c6f
commit 1861c13bcd
3 changed files with 8 additions and 6 deletions

View file

@ -171,9 +171,9 @@ exec XDC $params \
--datadir $DATA_DIR \ --datadir $DATA_DIR \
--keystore $KEYSTORE_DIR \ --keystore $KEYSTORE_DIR \
--identity $IDENTITY \ --identity $IDENTITY \
--maxpeers $MAXPEERS \
--password ./password \ --password ./password \
--port 30303 \ --port 30303 \
--maxpeers $MAXPEERS \
--txpool.globalqueue 5000 \ --txpool.globalqueue 5000 \
--txpool.globalslots 5000 \ --txpool.globalslots 5000 \
--rpc \ --rpc \

View file

@ -242,11 +242,13 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
if m2 == eb { if m2 == eb {
wallet, err := eth.accountManager.Find(accounts.Account{Address: eb}) wallet, err := eth.accountManager.Find(accounts.Account{Address: eb})
if err != nil { if err != nil {
log.Error("Can't find coinbase account wallet", "err", err)
return block, false, err return block, false, err
} }
header := block.Header() header := block.Header()
sighash, err := wallet.SignHash(accounts.Account{Address: eb}, XDPoS.SigHash(header).Bytes()) sighash, err := wallet.SignHash(accounts.Account{Address: eb}, XDPoS.SigHash(header).Bytes())
if err != nil { if err != nil || sighash == nil {
log.Error("Can't get signature hash of m2", "sighash", sighash, "err", err)
return block, false, err return block, false, err
} }
header.Validator = sighash header.Validator = sighash
@ -551,7 +553,7 @@ func CreateDB(ctx *node.ServiceContext, config *Config, name string) (ethdb.Data
// CreateConsensusEngine creates the required type of consensus engine instance for an Ethereum service // CreateConsensusEngine creates the required type of consensus engine instance for an Ethereum service
func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chainConfig *params.ChainConfig, db ethdb.Database) consensus.Engine { func CreateConsensusEngine(ctx *node.ServiceContext, config *ethash.Config, chainConfig *params.ChainConfig, db ethdb.Database) consensus.Engine {
// If Xinfin-XDPoS voting is requested, set it up // If Xinfin XDPoS is requested, set it up
if chainConfig.XDPoS != nil { if chainConfig.XDPoS != nil {
return XDPoS.New(chainConfig.XDPoS, db) return XDPoS.New(chainConfig.XDPoS, db)
} }