Skip to content

Commit

Permalink
Fix state for 0x0 block (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillPamPam authored Feb 1, 2024
1 parent ac5b443 commit 46bb122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract class RecursiveLowerBoundBlockDetector(
} else {
val middle = middleBlock(data)

if (data.left > data.right || middle == 0L) {
if (data.left > data.right) {
val current = if (data.current == 0L) 1 else data.current
Mono.just(LowerBoundData(current, true))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class EthereumLowerBoundBlockDetector(
}

override fun hasState(blockNumber: Long): Mono<Boolean> {
if (blockNumber == 0L) {
return Mono.just(true)
}
return upstream.getIngressReader().read(
JsonRpcRequest(
"eth_getBalance",
Expand Down

0 comments on commit 46bb122

Please sign in to comment.