Merge pull request #140 from p2p-org/support-null-values-in-subscription
Support for wider scope of providers
This commit is contained in:
@@ -81,6 +81,9 @@ open class EthereumUpstreamValidator(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.doOnError {
|
||||||
|
log.warn("Error validating ${upstream.getId()}", it)
|
||||||
|
}
|
||||||
.onErrorReturn(UpstreamAvailability.UNAVAILABLE)
|
.onErrorReturn(UpstreamAvailability.UNAVAILABLE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,11 @@ class EthereumWsHead(
|
|||||||
.flatMap { block ->
|
.flatMap { block ->
|
||||||
// newHeads returns incomplete blocks, i.e. without some fields and without transaction hashes,
|
// newHeads returns incomplete blocks, i.e. without some fields and without transaction hashes,
|
||||||
// so we need to fetch the full block data
|
// so we need to fetch the full block data
|
||||||
if (block.difficulty == null || block.transactions == null) {
|
if (block.difficulty == null ||
|
||||||
// TODO do we really need this ?
|
block.transactions == null ||
|
||||||
|
block.transactions.isEmpty() ||
|
||||||
|
block.totalDifficulty == null
|
||||||
|
) {
|
||||||
enhanceRealBlock(block)
|
enhanceRealBlock(block)
|
||||||
} else {
|
} else {
|
||||||
Mono.just(BlockContainer.from(block))
|
Mono.just(BlockContainer.from(block))
|
||||||
|
|||||||
Reference in New Issue
Block a user