Added log for grpc upstreams processing

This commit is contained in:
a10zn8
2023-01-19 16:06:37 +04:00
parent f6a6ee9757
commit d18d96513d

View File

@@ -125,6 +125,7 @@ class GrpcUpstreams(
} }
fun processDescription(value: BlockchainOuterClass.DescribeResponse): Flux<UpstreamChangeEvent> { fun processDescription(value: BlockchainOuterClass.DescribeResponse): Flux<UpstreamChangeEvent> {
log.info("Start processing grpc upstream description for $id with chains ${value.chainsList.map { it.chain.name }}")
val current = value.chainsList.filter { val current = value.chainsList.filter {
Chain.byId(it.chain.number) != Chain.UNSPECIFIED Chain.byId(it.chain.number) != Chain.UNSPECIFIED
}.mapNotNull { chainDetails -> }.mapNotNull { chainDetails ->
@@ -149,6 +150,7 @@ class GrpcUpstreams(
}.map { }.map {
UpstreamChangeEvent(it.key, known.remove(it.key)!!, UpstreamChangeEvent.ChangeType.REMOVED) UpstreamChangeEvent(it.key, known.remove(it.key)!!, UpstreamChangeEvent.ChangeType.REMOVED)
} }
log.info("Finished processing of grpc upstream description for $id with content delta added [${added.map { it.chain }}] and removed [${removed.map { it.chain }}]")
return Flux.fromIterable(removed + added) return Flux.fromIterable(removed + added)
} }