Fix archive (#444)

This commit is contained in:
KirillPamPam
2024-03-27 19:51:23 +04:00
committed by GitHub
parent 8b609ee2d1
commit 5fedc28d24
5 changed files with 12 additions and 12 deletions

View File

@@ -21,7 +21,6 @@ import io.emeraldpay.dshackle.upstream.calls.CallMethods
import io.emeraldpay.dshackle.upstream.calls.CallSelector
import io.emeraldpay.dshackle.upstream.calls.EthereumCallSelector
import io.emeraldpay.dshackle.upstream.ethereum.subscribe.AggregatedPendingTxes
import io.emeraldpay.dshackle.upstream.ethereum.subscribe.EthereumLabelsDetector
import io.emeraldpay.dshackle.upstream.ethereum.subscribe.EthereumWsIngressSubscription
import io.emeraldpay.dshackle.upstream.ethereum.subscribe.NoPendingTxes
import io.emeraldpay.dshackle.upstream.ethereum.subscribe.PendingTxesSource

View File

@@ -1,15 +1,16 @@
package io.emeraldpay.dshackle.upstream.ethereum.subscribe
package io.emeraldpay.dshackle.upstream.ethereum
import io.emeraldpay.dshackle.Chain
import io.emeraldpay.dshackle.reader.ChainReader
import io.emeraldpay.dshackle.upstream.BasicEthLabelsDetector
import io.emeraldpay.dshackle.upstream.ChainRequest
import io.emeraldpay.dshackle.upstream.ChainResponse
import io.emeraldpay.dshackle.upstream.ethereum.EthereumArchiveBlockNumberReader
import io.emeraldpay.dshackle.upstream.rpcclient.ListParams
import reactor.core.publisher.Flux
import reactor.core.publisher.Mono
const val ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"
class EthereumLabelsDetector(
private val reader: ChainReader,
private val chain: Chain,
@@ -36,7 +37,7 @@ class EthereumLabelsDetector(
return reader.read(
ChainRequest(
"eth_getBalance",
ListParams("0x756F45E3FA69347A9A973A725E3C98bC4db0b5a0", blockNumber),
ListParams(ZERO_ADDRESS, blockNumber),
),
).flatMap(ChainResponse::requireResult)
}

View File

@@ -47,7 +47,7 @@ class EthereumLowerBoundBlockDetector(
return upstream.getIngressReader().read(
ChainRequest(
"eth_getBalance",
ListParams("0x756F45E3FA69347A9A973A725E3C98bC4db0b5a0", blockNumber.toHex()),
ListParams(ZERO_ADDRESS, blockNumber.toHex()),
),
)
.retryWhen(retrySpec(nonRetryableErrors))