Skip to content

Instantly share code, notes, and snippets.

@EvaLovlac3
Created September 25, 2018 21:20
Show Gist options
  • Save EvaLovlac3/c559750f921d4a6515b262086d1103b4 to your computer and use it in GitHub Desktop.
Save EvaLovlac3/c559750f921d4a6515b262086d1103b4 to your computer and use it in GitHub Desktop.
def parseInputs():
parser = argparse.ArgumentParser(
description='This script may be run on a validator node to discover information on all the validators '
'configured in the ledger.')
parser.add_argument('--writeJson',
help='Boolean flag. If set, the output is json. (Default: the output is csv.)',
action='store_true')
parser.add_argument('--protocolVersion', help='Protocol version option is used to set which version of '
'geneis_transactions file the client should use for transactions'
'EXAMPLE: --protocolVersion=1', action='store_true')
args = parser.parse_args()
print(args.protocolVersion)
if not args.protocolVersion:
print("TESTING SOMETHING DUMB")
args.protocolVersion='2' # Mike said leave this on protocol version 2
elif args.protocolVersion == '1' or args.protocolVersion == '2':
args.protocolVersion
else:
print("ERROR:INVALID PARAMS \nPlease enter a correct parameter"
"\n EXAMPLE: protocolVersion = 1")
return args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment