Fix eth_subscribe to logs, add remaining chains to cli tool (#256)

This commit is contained in:
KirillPamPam
2023-07-21 16:49:59 +04:00
committed by GitHub
parent 121dcf0ca7
commit 675f160b2d
4 changed files with 37 additions and 29 deletions

View File

@@ -97,7 +97,11 @@ open class NativeSubscribe(
}
open fun subscribe(chain: Chain, method: String, params: Any?, matcher: Selector.Matcher): Flux<out Any> =
getUpstream(chain).getEgressSubscription().subscribe(method, params, matcher)
getUpstream(chain).getEgressSubscription()
.subscribe(method, params, matcher)
.doOnError {
log.error("Error during subscription to $method, chain $chain, params $params", it)
}
private fun getUpstream(chain: Chain): EthereumLikeMultistream =
multistreamHolder.getUpstream(chain).let { it as EthereumLikeMultistream }

View File

@@ -93,6 +93,7 @@ open class EthereumEgressSubscription(
null
}
}
null -> emptyList()
else -> throw IllegalArgumentException("Invalid type of address field. Must be string or list of strings")
}
} else {
@@ -114,6 +115,7 @@ open class EthereumEgressSubscription(
null
}
}
null -> emptyList()
else -> throw IllegalArgumentException("Invalid type of topics field. Must be string or list of strings")
}
} else {