diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumBlockValidator.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumBlockValidator.kt index 54a9413b..eb5113b7 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumBlockValidator.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumBlockValidator.kt @@ -80,7 +80,7 @@ class EthereumBlockValidator : BlockValidator { private fun validateDifficulty(node: JsonNode, rlpEncoded: Map): Boolean { val difficulty = fromHexStringI(node["difficulty"].asText()) - if (difficulty.signum() <= 0) { + if (difficulty.compareTo(BigInteger.ZERO) == 0 || difficulty.signum() < 0) { return false } val nonce = fromHexStringI(node["nonce"].asText())