Do not shadow chainId

This commit is contained in:
ligi 2022-12-05 02:00:49 +01:00
parent 93991ff0c5
commit ba442eaadb

View File

@ -446,9 +446,9 @@ fun checkChain(chainFile: File, connectRPC: Boolean, verbose: Boolean = false) {
} catch (e: Exception) {
}
chainId?.let { chainId ->
if (chainIdAsLong != chainId.toLong()) {
error("RPC chainId (${chainId.toLong()}) does not match chainId from json ($chainIdAsLong)")
chainId?.let { nonNullChainId ->
if (chainIdAsLong != nonNullChainId.toLong()) {
error("RPC chainId (${nonNullChainId.toLong()}) does not match chainId from json ($chainIdAsLong)")
}
}
}