diff --git a/contracts/ValidatorSetAuRa.sol b/contracts/ValidatorSetAuRa.sol index 458382c9..7f33e0bd 100644 --- a/contracts/ValidatorSetAuRa.sol +++ b/contracts/ValidatorSetAuRa.sol @@ -565,7 +565,9 @@ contract ValidatorSetAuRa is UpgradeabilityAdmin, IValidatorSetAuRa { uint256 _blockNumber ) public view returns(bool) { uint256 currentBlock = _getCurrentBlockNumber(); - if (_blockNumber > currentBlock) { + if (_blockNumber > currentBlock + 1) { + // we added +1 in the condition to let validator next to the malicious one correctly report + // because that validator will use the previous block state when calling this getter return false; } if (currentBlock > 100 && currentBlock - 100 > _blockNumber) { diff --git a/package-lock.json b/package-lock.json index c94c8ab8..d4625e10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "posdao-contracts", - "version": "0.2.0", + "version": "0.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ae52943a..5a2a63df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "posdao-contracts", - "version": "0.2.0", + "version": "0.2.1", "description": "Smart contracts for POSDAO consensus", "main": "index.js", "scripts": {