diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt index 295adcebb..8c5b279f0 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt @@ -124,20 +124,20 @@ class DefaultEthereumMethods( private val possibleNotIndexedMethods = listOf( "eth_getTransactionByHash", - "eth_getTransactionReceipt" - ) - - private val firstValueMethods = listOf( - "eth_call", + "eth_getTransactionReceipt", "eth_getBlockTransactionCountByHash", - "eth_getUncleCountByBlockHash", "eth_getBlockByHash", "eth_getBlockByNumber", "eth_getTransactionByBlockHashAndIndex", "eth_getTransactionByBlockNumberAndIndex", + "eth_getUncleByBlockHashAndIndex", + "eth_getUncleCountByBlockHash" + ) + + private val firstValueMethods = listOf( + "eth_call", "eth_getStorageAt", "eth_getCode", - "eth_getUncleByBlockHashAndIndex", "eth_getLogs", "eth_maxPriorityFeePerGas", "eth_getProof" diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLocalReader.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLocalReader.kt index 4e59a8163..27f76ec21 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLocalReader.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumLocalReader.kt @@ -60,6 +60,7 @@ class EthereumLocalReader( return Mono.empty() } val common = commonRequests(key) + ?.switchIfEmpty { Mono.just(nullValue to null) } if (common != null) { return common.map { JsonRpcResponse(it.first, null, it.second) } } @@ -88,7 +89,6 @@ class EthereumLocalReader( reader.txByHashAsCont() .read(hash) .map { it.data.json!! to it.upstreamId } - .switchIfEmpty { Mono.just(nullValue to null) } } method == "eth_getBlockByHash" -> { if (params.size != 2) { @@ -123,7 +123,6 @@ class EthereumLocalReader( reader.receipts() .read(hash) .map { it.data to it.upstreamId } - .switchIfEmpty { Mono.just(nullValue to null) } } else -> null }