Correct naming

This commit is contained in:
Michał Sałaban 2018-01-14 23:37:54 +01:00
parent 333caafa90
commit fed8a15281
2 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,7 @@ def destpair(s):
argsparser = argparse.ArgumentParser(description="Transfer Monero")
argsparser.add_argument('-v', dest='verbosity', action='count', default=0,
help="Verbosity (repeat to increase; -v for INFO, -vv for DEBUG")
argsparser.add_argument('daemon_url', nargs='?', type=url_data, default='127.0.0.1:18082',
argsparser.add_argument('wallet_rpc_url', nargs='?', type=url_data, default='127.0.0.1:18082',
help="Daemon URL [user[:password]@]host[:port]")
argsparser.add_argument('-a', dest='account', default=0, type=int, help="Source account index")
argsparser.add_argument('-p', dest='prio',
@ -50,7 +50,7 @@ elif args.verbosity > 1:
level = logging.DEBUG
logging.basicConfig(level=level, format="%(asctime)-15s %(message)s")
w = Wallet(JSONRPCWallet(**args.daemon_url))
w = Wallet(JSONRPCWallet(**args.wallet_rpc_url))
txfrs = w.accounts[args.account].transfer_multiple(
args.destinations, priority=prio, ringsize=args.ring_size, payment_id=args.payment_id,
relay=args.outdir is None)
@ -58,7 +58,7 @@ for tx in txfrs:
print(u"Transaction {hash}:\nXMR: {amount:21.12f} @ {fee:13.12f} fee\n"
u"Payment ID: {payment_id}\nTx key: {key}\nSize: {size} B".format(
hash=tx.hash, amount=tx.amount, fee=tx.fee,
payment_id=tx.payment_id, key=tx.key, size=len(tx.blob)))
payment_id=tx.payment_id, key=tx.key, size=len(tx.blob) >> 1))
if args.outdir:
outname = os.path.join(args.outdir, tx.hash + '.tx')
outfile = open(outname, 'wb')

View file

@ -17,8 +17,8 @@ def url_data(url):
def get_wallet():
argsparser = argparse.ArgumentParser(description="Display wallet contents")
argsparser.add_argument('daemon_url', nargs='?', type=url_data, default='127.0.0.1:18082',
help="Daemon URL [user[:password]@]host[:port]")
argsparser.add_argument('wallet_rpc_url', nargs='?', type=url_data, default='127.0.0.1:18082',
help="Wallet RPC URL [user[:password]@]host[:port]")
argsparser.add_argument('-v', dest='verbosity', action='count', default=0,
help="Verbosity (repeat to increase; -v for INFO, -vv for DEBUG")
args = argsparser.parse_args()
@ -28,7 +28,7 @@ def get_wallet():
elif args.verbosity > 1:
level = logging.DEBUG
logging.basicConfig(level=level, format="%(asctime)-15s %(message)s")
return Wallet(JSONRPCWallet(**args.daemon_url))
return Wallet(JSONRPCWallet(**args.wallet_rpc_url))
_TXHDR = "timestamp height id/hash " \
" amount fee {dir:95s} payment_id"