From 73d080c125079a3965d93306a821c1aceeabd256 Mon Sep 17 00:00:00 2001 From: Jaynti Kanani Date: Wed, 26 Jun 2019 15:08:02 +0530 Subject: [PATCH] fix difficulty --- consensus/bor/bor.go | 2 +- contracts/validatorset/contract/BorValidatorSet.sol | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/consensus/bor/bor.go b/consensus/bor/bor.go index 6827c69a1e..920677623c 100644 --- a/consensus/bor/bor.go +++ b/consensus/bor/bor.go @@ -353,7 +353,7 @@ func (c *Bor) verifyHeader(chain consensus.ChainReader, header *types.Header, pa } // Ensure that the block's difficulty is meaningful (may not be correct at this point) if number > 0 { - if header.Difficulty == nil || (header.Difficulty.Cmp(diffInTurn) != 0 && header.Difficulty.Cmp(diffNoTurn) != 0) { + if header.Difficulty == nil { return errInvalidDifficulty } } diff --git a/contracts/validatorset/contract/BorValidatorSet.sol b/contracts/validatorset/contract/BorValidatorSet.sol index ae73ded936..d2683b1d90 100644 --- a/contracts/validatorset/contract/BorValidatorSet.sol +++ b/contracts/validatorset/contract/BorValidatorSet.sol @@ -39,12 +39,16 @@ contract BorValidatorSet is ValidatorSet { /// Get current validator set (last enacted or initial if no changes ever made) with current stake. function getValidators() external view returns (address[] memory, uint256[] memory) { - address[] memory d = new address[](2); + address[] memory d = new address[](4); d[0] = 0x9fB29AAc15b9A4B7F17c3385939b007540f4d791; d[1] = 0x96C42C56fdb78294F96B0cFa33c92bed7D75F96a; - uint256[] memory p = new uint256[](2); + d[2] = 0x7D58F677794ECdB751332c9A507993dB1b008874; + d[3] = 0xE4F1A86989758D4aC65671855B9a29B843bb865D; + uint256[] memory p = new uint256[](4); p[0] = 10; p[1] = 20; + p[2] = 30; + p[3] = 40; return (d, p); } } \ No newline at end of file