diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 621dcdabf6..8ec3c3df39 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -1320,4 +1320,4 @@ func TestLargeReorgTrieGC(t *testing.T) { t.Fatalf("competitor %d: competing chain state missing", i) } } -} \ No newline at end of file +} diff --git a/docker/XDCchain/entrypoint.sh b/docker/XDCchain/entrypoint.sh index 2865703c56..fb28fc1534 100755 --- a/docker/XDCchain/entrypoint.sh +++ b/docker/XDCchain/entrypoint.sh @@ -171,9 +171,9 @@ exec XDC $params \ --datadir $DATA_DIR \ --keystore $KEYSTORE_DIR \ --identity $IDENTITY \ + --maxpeers $MAXPEERS \ --password ./password \ --port 30303 \ - --maxpeers $MAXPEERS \ --txpool.globalqueue 5000 \ --txpool.globalslots 5000 \ --rpc \ @@ -188,4 +188,4 @@ exec XDC $params \ --mine \ --gasprice "250000000" \ --targetgaslimit "84000000" \ - "$@" \ No newline at end of file + "$@" diff --git a/eth/backend.go b/eth/backend.go index df9c20870d..8d88e2cec4 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -242,11 +242,13 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { if m2 == eb { wallet, err := eth.accountManager.Find(accounts.Account{Address: eb}) if err != nil { + log.Error("Can't find coinbase account wallet", "err", err) return block, false, err } header := block.Header() 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 } 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 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 { return XDPoS.New(chainConfig.XDPoS, db) } @@ -864,4 +866,4 @@ func rewardInflation(chainReward *big.Int, number uint64, blockPerYear uint64) * func (s *Ethereum) GetPeer() int { return len(s.protocolManager.peers.peers) -} \ No newline at end of file +}