Skip to content

Commit

Permalink
fix difficulty
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkanani committed Jun 26, 2019
1 parent f12ae30 commit 73d080c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion consensus/bor/bor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
8 changes: 6 additions & 2 deletions contracts/validatorset/contract/BorValidatorSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 73d080c

Please sign in to comment.