Skip to content

Commit

Permalink
Remove unused password generation method from TestPredeployed class
Browse files Browse the repository at this point in the history
  • Loading branch information
yavrsky committed Dec 19, 2024
1 parent 8f87f0e commit ac6cfe5
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions predeployed/test/tools/test_predeployed.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
class TestPredeployed:
GENESIS_FILENAME = 'genesis.json'

def generate_extradata(self):
self.password = ''.join(random.choices(string.ascii_lowercase + string.digits, k=12))
self.password_filename = os.path.join(self.datadir, 'password.txt')
with open(self.password_filename, 'w') as password_f:
password_f.writelines([self.password])
process = subprocess.run(['geth', 'account', 'new', '--datadir', self.datadir, '--password', self.password_filename])
assert process.returncode == 0

process = subprocess.Popen(['geth', 'account', 'list', '--datadir', self.datadir], stdout=subprocess.PIPE,
universal_newlines=True)
account0 = process.stdout.readline()
self.author_address = account0.split()[2][1:-1]
return '0x' + '00' * 32 + self.author_address + '00' * 65

def generate_genesis(self, allocations: dict = {}):
base_genesis_filename = os.path.join(os.path.dirname(__file__), 'base_genesis.json')
with open(base_genesis_filename) as base_genesis_file:
Expand Down

0 comments on commit ac6cfe5

Please sign in to comment.