Skip unparsed TransactionReceiptJson responses
This commit is contained in:
@@ -117,7 +117,7 @@ class EthereumDirectReader(
|
|||||||
val request = JsonRpcRequest("eth_getTransactionReceipt", listOf(key.toHex()))
|
val request = JsonRpcRequest("eth_getTransactionReceipt", listOf(key.toHex()))
|
||||||
return readWithQuorum(request)
|
return readWithQuorum(request)
|
||||||
.timeout(Defaults.timeoutInternal, Mono.error(TimeoutException("Receipt not read $key")))
|
.timeout(Defaults.timeoutInternal, Mono.error(TimeoutException("Receipt not read $key")))
|
||||||
.doOnNext { json ->
|
.flatMap { json ->
|
||||||
try {
|
try {
|
||||||
// Caching needs some additional data (ex. Height) to make a decision on how long and where to cache
|
// Caching needs some additional data (ex. Height) to make a decision on how long and where to cache
|
||||||
// So we have to parse the JSON here and extract reference data
|
// So we have to parse the JSON here and extract reference data
|
||||||
@@ -134,7 +134,9 @@ class EthereumDirectReader(
|
|||||||
)
|
)
|
||||||
} catch (t: Throwable) {
|
} catch (t: Throwable) {
|
||||||
log.warn("Failed to cache Tx Receipt", t)
|
log.warn("Failed to cache Tx Receipt", t)
|
||||||
|
return@flatMap Mono.empty()
|
||||||
}
|
}
|
||||||
|
Mono.just(json)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user