Many small improvements
Code improvements seen on #42 (closed): Retrieve informations once and use them in the whole program
Would the variable pretty
better named pretty_currency
?
ep[best_node(ep, False)]
ok now I see: best_node give the DNS or the IPv4 or the IPv6 of the endpoint ! It doesn't select a node among all.
So maybe best_address
would be a better name ? or best_endpoint_address
?
By the way, if the port is 443, the scheme is https
not http
I think.
Can you use constants.G1_SYMBOL
instead of pretty_names = {'g1': 'Ğ1', 'gtest': 'Ğtest'}
?
Maybe this dict would be in the constants package too ?
Is amount
the amount "signed" in the blockchain and totalAmountInput
the amount "signed" and "not yet signed" in the blockchain ?
# output
Useless comment.
I think we can refactor this :
# "--" in CLI to authenticate otherwise use pubkeys
if "--" in args:
pubkeys = [get_publickey_from_seed(auth...)]
else:
pubkeys = args.split(":")
# ensure pubkeys are real
...
for pubkey in pubkeys:
get amount
show amount
...
can we rename value
to amount
? Actually amounts
would be even better.
I think the last port is 65535
That's the hell of a (near) one liner condition ;-)
it's clever, but maybe putting the input(tabulate...
in a "user_confirm_transaction" function would make it more readable ?
chart
is a "graphique", do you mean a table ?
-
https://git.duniter.org/clients/python/silkaj/blob/d1f53c1fdb4b1e9218e0980183f0c295198c0483/src/commands.py#L233-234 Mutualise this call with the previous line using a
ep_address
variable?