Browse Source

`proto.eth.misc` -> `proto.eth.util`

The MMGen Project 6 months ago
parent
commit
c62d3f1a38
4 changed files with 7 additions and 7 deletions
  1. 2 2
      mmgen/proto/eth/msg.py
  2. 1 1
      mmgen/proto/eth/util.py
  3. 1 1
      mmgen/tool/fileutil.py
  4. 3 3
      test/cmdtest_d/ethdev.py

+ 2 - 2
mmgen/proto/eth/msg.py

@@ -23,14 +23,14 @@ class coin_msg(coin_msg):
 	class unsigned(coin_msg.unsigned):
 
 		async def do_sign(self, wif, message, msghash_type):
-			from .misc import ec_sign_message_with_privkey
+			from .util import ec_sign_message_with_privkey
 			return ec_sign_message_with_privkey(self.cfg, message, bytes.fromhex(wif), msghash_type)
 
 	class signed_online(coin_msg.signed_online):
 
 		async def do_verify(self, addr, sig, message, msghash_type):
 			from ...tool.coin import tool_cmd
-			from .misc import ec_recover_pubkey
+			from .util import ec_recover_pubkey
 			return tool_cmd(
 				self.cfg,
 				proto = self.proto).pubhex2addr(

+ 1 - 1
mmgen/proto/eth/misc.py → mmgen/proto/eth/util.py

@@ -9,7 +9,7 @@
 #   https://gitlab.com/mmgen/mmgen-wallet
 
 """
-proto.eth.misc: miscellaneous utilities for Ethereum base protocol
+proto.eth.util: various utilities for Ethereum base protocol
 """
 
 from ...util2 import get_keccak

+ 1 - 1
mmgen/tool/fileutil.py

@@ -164,5 +164,5 @@ class tool_cmd(tool_cmd_base):
 		"decrypt the private key in a Geth keystore wallet, returning the decrypted key in hex format"
 		from ..ui import line_input
 		passwd = line_input(self.cfg, 'Enter passphrase: ', echo=self.cfg.echo_passphrase).strip().encode()
-		from ..proto.eth.misc import decrypt_geth_keystore
+		from ..proto.eth.util import decrypt_geth_keystore
 		return decrypt_geth_keystore(self.cfg, wallet_file, passwd, check_addr=check_addr).hex()

+ 3 - 3
test/cmdtest_d/ethdev.py

@@ -28,7 +28,7 @@ from pathlib import Path
 
 from mmgen.color import red, yellow, blue, cyan, orange, set_vt100
 from mmgen.util import msg, msg_r, rmsg, die
-from mmgen.proto.eth.misc import compute_contract_addr
+from mmgen.proto.eth.util import compute_contract_addr
 
 from ..include.common import (
 	cfg,
@@ -799,7 +799,7 @@ class CmdTestEthdev(CmdTestEthdevMethods, CmdTestBase, CmdTestShared):
 
 			wallet_fn = os.path.join( self.keystore_dir, os.listdir(self.keystore_dir)[0])
 
-			from mmgen.proto.eth.misc import decrypt_geth_keystore
+			from mmgen.proto.eth.util import decrypt_geth_keystore
 			key = decrypt_geth_keystore(
 				cfg       = self.cfg,
 				wallet_fn = wallet_fn,
@@ -1160,7 +1160,7 @@ class CmdTestEthdev(CmdTestEthdevMethods, CmdTestBase, CmdTestShared):
 		def create_signature_mmgen():
 			key = self.keystore_data['key']
 			imsg(f'Key:       {key}')
-			from mmgen.proto.eth.misc import ec_sign_message_with_privkey
+			from mmgen.proto.eth.util import ec_sign_message_with_privkey
 			return ec_sign_message_with_privkey(self.cfg, self.message, bytes.fromhex(key), 'eth_sign')
 
 		async def create_signature_rpc():