allow pending block tag for block tag methods

This commit is contained in:
Termina1
2023-08-02 16:23:44 +03:00
parent a8c888780a
commit 1d8445b3c3

View File

@@ -142,6 +142,7 @@ class EthereumCallSelector(
private fun blockSelectorByTag(tag: String, head: Head): Mono<Selector.Matcher> {
val minHeight: Long? = when (tag) {
"latest" -> head.getCurrentHeight()
"pending" -> null
"earliest" -> 0L // for earliest it doesn't nothing, we expect to have 0 block
else -> if (tag.startsWith("0x") || tag.toLongOrNull() != null) {
return if (tag.length == 66) { // 32-byte hash is represented as 0x + 64 characters