txcreate, txdo: delay RPC initialization
This commit is contained in:
parent
0b833dadea
commit
9a963e1488
3 changed files with 2 additions and 6 deletions
|
|
@ -112,9 +112,6 @@ async def main():
|
|||
from .tx import NewTX
|
||||
tx1 = await NewTX(cfg=cfg, proto=cfg._proto, target=target)
|
||||
|
||||
from .rpc import rpc_init
|
||||
tx1.rpc = await rpc_init(cfg)
|
||||
|
||||
tx2 = await tx1.create(
|
||||
cmd_args = cfg._args,
|
||||
locktime = int(cfg.locktime or 0),
|
||||
|
|
|
|||
|
|
@ -153,9 +153,6 @@ async def main():
|
|||
|
||||
tx1 = await NewTX(cfg=cfg, proto=cfg._proto, target=target)
|
||||
|
||||
from .rpc import rpc_init
|
||||
tx1.rpc = await rpc_init(cfg)
|
||||
|
||||
tx2 = await tx1.create(
|
||||
cmd_args = cfg._args,
|
||||
locktime = int(cfg.locktime or 0),
|
||||
|
|
|
|||
|
|
@ -418,6 +418,8 @@ class New(Base):
|
|||
if self.target == 'swaptx':
|
||||
# updates self.proto!
|
||||
self.proto, cmd_args = await self.process_swap_cmdline_args(cmd_args, addrfile_args)
|
||||
from ..rpc import rpc_init
|
||||
self.rpc = await rpc_init(self.cfg, self.proto)
|
||||
from ..addrdata import TwAddrData
|
||||
await self.process_cmdline_args(
|
||||
cmd_args,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue