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