From 379385292073294172dc005947b3ff4d167b7408 Mon Sep 17 00:00:00 2001 From: MMGen Date: Fri, 25 May 2018 14:08:11 +0000 Subject: [PATCH] obj.py,rpc.py: minor changes --- mmgen/obj.py | 5 +++-- mmgen/rpc.py | 12 +++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/mmgen/obj.py b/mmgen/obj.py index 772c9ab4..698d9c2c 100755 --- a/mmgen/obj.py +++ b/mmgen/obj.py @@ -147,7 +147,8 @@ class Hilite(object): add_len = len(a) + len(b) + len(append_chars) if width == None: width = cls.width if trunc_ok == None: trunc_ok = cls.trunc_ok - assert width >= 2 + add_len,'Width must be at least 2' # 2 because CJK + assert width >= 2 + add_len,( # 2 because CJK + "'{!r}': invalid width ({}) (width must be at least 2)".format(s,width)) if len(s) + s_wide_count + add_len > width: assert trunc_ok, "If 'trunc_ok' is false, 'width' must be >= screen width of string" s = truncate_str(s,width-add_len) @@ -303,7 +304,7 @@ class BTCAmt(Decimal,Hilite,InitErrors): color = 'yellow' max_prec = 8 max_amt = 21000000 - min_coin_unit = Decimal('0.00000001') + min_coin_unit = Decimal('0.00000001') # satoshi def __new__(cls,num,on_fail='die'): if type(num) == cls: return num diff --git a/mmgen/rpc.py b/mmgen/rpc.py index 81d02e85..6ba72616 100755 --- a/mmgen/rpc.py +++ b/mmgen/rpc.py @@ -208,6 +208,7 @@ class EthereumRPCConnection(CoinDaemonRPCConnection): 'eth_blockNumber', 'eth_gasPrice', 'eth_getBalance', + 'eth_getBlock', 'eth_getBlockByHash', 'eth_getBlockByNumber', 'eth_getTransactionByHash', @@ -215,12 +216,21 @@ class EthereumRPCConnection(CoinDaemonRPCConnection): 'eth_sendRawTransaction', 'eth_signTransaction', 'eth_syncing', - 'parity_accountsInfo', + 'net_listening', + 'net_peerCount', + 'net_version', + 'parity_chain', 'parity_chainStatus', 'parity_gasCeilTarget', 'parity_gasFloorTarget', + 'parity_localTransactions', 'parity_minGasPrice', + 'parity_mode', 'parity_netPeers', + 'parity_nodeKind', + 'parity_nodeName', + 'parity_pendingTransactions', + 'parity_pendingTransactionsStats', 'parity_versionInfo', )