eth_simulateV1 detector fix (#648)
* eth_simulateV1 detector fix * remove reth node from detect, fix test
This commit is contained in:
@@ -25,7 +25,7 @@ abstract class UpstreamRpcMethodsDetector(
|
||||
private val availableRegexps =
|
||||
listOf(
|
||||
"missing value for required argument ([0-9]+)",
|
||||
"Invalid params",
|
||||
// "Invalid params", // todo: uncomment when reth node issue will be fixed
|
||||
).map { s -> s.toRegex() }
|
||||
|
||||
open fun detectRpcMethods(): Mono<Map<String, Boolean>> = detectByMagicMethod().switchIfEmpty(detectByMethod())
|
||||
|
||||
@@ -34,7 +34,7 @@ class BasicEthUpstreamRpcMethodsDetector(
|
||||
setOf(
|
||||
"eth_getBlockReceipts" to ListParams("latest"),
|
||||
"trace_callMany" to ListParams(listOf(listOf<Any>())),
|
||||
"eth_simulateV1" to ListParams(listOf(listOf<Any>())),
|
||||
"eth_simulateV1" to ListParams(listOf()),
|
||||
)
|
||||
|
||||
private fun parseRpcModules(data: ByteArray): Map<String, Boolean> {
|
||||
|
||||
@@ -49,7 +49,7 @@ class BasicEthUpstreamRpcMethodsDetectorTest {
|
||||
),
|
||||
)
|
||||
on {
|
||||
read(ChainRequest("eth_simulateV1", ListParams(listOf(listOf<Any>()))))
|
||||
read(ChainRequest("eth_simulateV1", ListParams(listOf())))
|
||||
} doReturn
|
||||
Mono.just(
|
||||
ChainResponse(
|
||||
@@ -107,7 +107,7 @@ class BasicEthUpstreamRpcMethodsDetectorTest {
|
||||
),
|
||||
)
|
||||
on {
|
||||
read(ChainRequest("eth_simulateV1", ListParams(listOf(listOf<Any>()))))
|
||||
read(ChainRequest("eth_simulateV1", ListParams(listOf())))
|
||||
} doReturn
|
||||
Mono.just(
|
||||
ChainResponse(
|
||||
@@ -166,7 +166,7 @@ class BasicEthUpstreamRpcMethodsDetectorTest {
|
||||
),
|
||||
)
|
||||
on {
|
||||
read(ChainRequest("eth_simulateV1", ListParams(listOf(listOf<Any>()))))
|
||||
read(ChainRequest("eth_simulateV1", ListParams(listOf())))
|
||||
} doReturn
|
||||
Mono.just(
|
||||
ChainResponse(
|
||||
|
||||
Reference in New Issue
Block a user