diff --git a/src/main/kotlin/org/ethereum/lists/chains/Main.kt b/src/main/kotlin/org/ethereum/lists/chains/Main.kt index cdb9168e..74cee68a 100644 --- a/src/main/kotlin/org/ethereum/lists/chains/Main.kt +++ b/src/main/kotlin/org/ethereum/lists/chains/Main.kt @@ -13,10 +13,16 @@ val parsedNames= mutableSetOf() fun main(args: Array) { - File("_data/chains").listFiles()?.forEach { + val allFiles = File("_data/chains").listFiles()?:return + allFiles.filter { !it.isDirectory }.forEach { checkChain(it, args.contains("rpcConnect")) } + allFiles.filter { it.isDirectory }.forEach { + if (it.name != "deprecated") { + error("the only directory allowed is 'deprecated'") + } + } } fun checkChain(it: File, connectRPC: Boolean) {