Call limit better error and limit.

This commit is contained in:
Termina1
2023-07-12 14:09:45 +03:00
parent b57153826c
commit 8ac9040736

View File

@@ -81,17 +81,18 @@ open class EthereumUpstreamValidator @JvmOverloads constructor(
TransactionCallJson( TransactionCallJson(
Address.from(callLimitContract), Address.from(callLimitContract),
// calling contract with param 200_000, meaning it will generate 200k symbols or response // calling contract with param 200_000, meaning it will generate 200k symbols or response
// 30d40 — 200_000 // 30ce0 + metadata — 200_000k
HexData.from("0xd8a26e3a0000000000000000000000000000000000000000000000000000000000030d40") HexData.from("0xd8a26e3a0000000000000000000000000000000000000000000000000000000000030ce0")
) ),
"latest"
) )
) )
) )
.flatMap(JsonRpcResponse::requireResult) .flatMap(JsonRpcResponse::requireResult)
.doOnError { .doOnError {
log.error( log.error(
"Node ${upstream.getId()} is incorrectly configured. " + "Error: ${it.message}. Node ${upstream.getId()} is prbably incorrectly configured. " +
"You need to set up your return limit to at least 200000." + "You need to set up your return limit to at least 200000. " +
"Erigon config example: https://github.com/ledgerwatch/erigon/blob/devel/cmd/utils/flags.go#L364. " "Erigon config example: https://github.com/ledgerwatch/erigon/blob/devel/cmd/utils/flags.go#L364. "
) )
} }