only load P2PKH addresses from database

This commit is contained in:
Isaacdelly
2022-12-05 12:47:33 -08:00
committed by GitHub
parent c4b297725f
commit 15aedea960

View File

@@ -126,6 +126,7 @@ if __name__ == '__main__':
if cpu_count > 0 and cpu_count <= multiprocessing.cpu_count(): if cpu_count > 0 and cpu_count <= multiprocessing.cpu_count():
args['cpu_count'] = cpu_count args['cpu_count'] = cpu_count
else: else:
args['cpu_count'] = multiprocessing.cpu_count()
print('invalid input. cpu_count must be greater than 0 and less than or equal to ' + str(multiprocessing.cpu_count())) print('invalid input. cpu_count must be greater than 0 and less than or equal to ' + str(multiprocessing.cpu_count()))
sys.exit(-1) sys.exit(-1)
elif command == 'verbose': elif command == 'verbose':
@@ -152,6 +153,7 @@ if __name__ == '__main__':
with open(DATABASE + filename) as file: with open(DATABASE + filename) as file:
for address in file: for address in file:
address = address.strip() address = address.strip()
if address.startswith('1'):
database.add(address[-args['substring']:]) database.add(address[-args['substring']:])
print('DONE') print('DONE')