rpc_init(): make proto a keyword parameter
This commit is contained in:
parent
d4db9b0409
commit
bac47a6a0a
3 changed files with 5 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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!')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue