From 9810a31447cc23223c34aa5f7ef2be67591d85a5 Mon Sep 17 00:00:00 2001 From: zah Date: Tue, 20 Oct 2020 16:01:21 +0300 Subject: [PATCH] Fix #1838 (#1892) --- beacon_chain/keystore_management.nim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/beacon_chain/keystore_management.nim b/beacon_chain/keystore_management.nim index 55595ce3a..eff934cd4 100644 --- a/beacon_chain/keystore_management.nim +++ b/beacon_chain/keystore_management.nim @@ -566,8 +566,15 @@ proc importKeystoresFromDir*(rng: var BrHmacDrbgContext, try: for file in walkDirRec(importedDir): - let ext = splitFile(file).ext - if toLowerAscii(ext) != ".json": + let filenameParts = splitFile(file) + if toLowerAscii(filenameParts.ext) != ".json": + continue + + # In case we are importing from eth2.0-deposits-cli, the imported + # validator_keys directory will also include a "deposit_data" file + # intended for uploading to the launchpad. We'll skip it to avoid + # the "Invalid keystore" warning that it will trigger. + if filenameParts.name.startsWith("deposit_data"): continue let keystore =