rpc_init(): make proto a keyword parameter

This commit is contained in:
The MMGen Project 2023-04-04 16:04:13 +00:00
commit bac47a6a0a
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 5 additions and 3 deletions

View file

@ -87,7 +87,7 @@ async def main():
tx1 = await NewTX(cfg=cfg,proto=cfg._proto)
from .rpc import rpc_init
tx1.rpc = await rpc_init(cfg,cfg._proto)
tx1.rpc = await rpc_init(cfg)
tx2 = await tx1.create(
cmd_args = cfg._args,

View file

@ -135,7 +135,7 @@ async def main():
tx1 = await NewTX(cfg=cfg,proto=cfg._proto)
from .rpc import rpc_init
tx1.rpc = await rpc_init(cfg,cfg._proto)
tx1.rpc = await rpc_init(cfg)
tx2 = await tx1.create(
cmd_args = cfg._args,

View file

@ -448,12 +448,14 @@ class RPCClient(MMGenObject):
async def rpc_init(
cfg,
proto,
proto = None,
backend = None,
daemon = None,
ignore_daemon_version = False,
ignore_wallet = False ):
proto = proto or cfg._proto
if not 'rpc_init' in proto.mmcaps:
die(1,f'rpc_init() not supported for {proto.name} protocol!')