mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 22:34:45 +00:00
Remove keystore json
This commit is contained in:
@@ -1,13 +1,22 @@
|
||||
# This script uses the `ethereum/staking-deposit-cli` tool to generate
|
||||
# deposit data files which are then used for testing by Lighthouse.
|
||||
#
|
||||
# To generate vectors, simply run this Python script:
|
||||
#
|
||||
# `python generate.py`
|
||||
#
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import subprocess
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
|
||||
|
||||
NUM_VALIDATORS=3
|
||||
TEST_MNEMONIC = "test test test test test test test test test test test waste"
|
||||
WALLET_NAME="test_wallet"
|
||||
|
||||
|
||||
tmp_dir = os.path.join(".", "tmp")
|
||||
mnemonic_path = os.path.join(tmp_dir, "mnemonic.txt")
|
||||
sdc_dir = os.path.join(tmp_dir, "sdc")
|
||||
@@ -34,6 +43,13 @@ def cleanup():
|
||||
if os.path.exists(tmp_dir):
|
||||
shutil.rmtree(tmp_dir)
|
||||
|
||||
# Remove all the keystores since we don't use them in testing.
|
||||
if os.path.exists(vectors_dir):
|
||||
for root, dirs, files in os.walk(vectors_dir):
|
||||
for file in files:
|
||||
if file.startswith("keystore"):
|
||||
os.remove(os.path.join(root, file))
|
||||
|
||||
|
||||
def setup_sdc():
|
||||
result = subprocess.run([
|
||||
@@ -58,6 +74,7 @@ def setup_sdc():
|
||||
], cwd=sdc_git_dir)
|
||||
assert(result.returncode == 0)
|
||||
|
||||
|
||||
def sdc_generate(network, first_index, count, eth1_withdrawal_address=None):
|
||||
if eth1_withdrawal_address is not None:
|
||||
eth1_flags = ['--eth1_withdrawal_address', eth1_withdrawal_address]
|
||||
@@ -90,7 +107,6 @@ def sdc_generate(network, first_index, count, eth1_withdrawal_address=None):
|
||||
process.wait()
|
||||
|
||||
|
||||
|
||||
def test_network(network):
|
||||
sdc_generate(network, first_index=0, count=1)
|
||||
sdc_generate(network, first_index=0, count=2)
|
||||
|
||||
Reference in New Issue
Block a user