AddrListID: call cleanups; proto.btc.daemon: missing import fix
This commit is contained in:
parent
e7a60184ed
commit
321c85bf8f
6 changed files with 13 additions and 8 deletions
|
|
@ -88,7 +88,9 @@ class TwAddrData(AddrData,metaclass=AsyncInit):
|
|||
if len(addr_array) != 1:
|
||||
message = self.msgs['multiple_acct_addrs'].strip().format( acct=acct, proj=g.proj_name )
|
||||
die(3, fmt( message, indent=' ' ))
|
||||
al_id = AddrListID(SeedID(sid=obj.sid),self.proto.addr_type(obj.mmtype))
|
||||
al_id = AddrListID(
|
||||
sid = SeedID(sid=obj.sid),
|
||||
mmtype = self.proto.addr_type(obj.mmtype) )
|
||||
if al_id not in out:
|
||||
out[al_id] = []
|
||||
out[al_id].append(AddrListEntry(self.proto,idx=obj.idx,addr=addr_array[0],comment=l.comment))
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ class AddrFile(MMGenObject):
|
|||
|
||||
p.base_coin = proto.base_coin
|
||||
p.network = proto.network
|
||||
p.al_id = AddrListID(SeedID(sid=sid),mmtype)
|
||||
p.al_id = AddrListID( sid=SeedID(sid=sid), mmtype=mmtype )
|
||||
|
||||
data = self.parse_file_body(lines[1:-1])
|
||||
assert isinstance(data,list),'Invalid file body data'
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class AddrList(MMGenObject): # Address info for a single seed ID
|
|||
do_chksum = False
|
||||
|
||||
if seed and addr_idxs: # data from seed + idxs
|
||||
self.al_id = AddrListID( seed.sid, MMGenAddrType(proto, mmtype or proto.dfl_mmtype) )
|
||||
self.al_id = AddrListID( sid=seed.sid, mmtype=MMGenAddrType(proto, mmtype or proto.dfl_mmtype) )
|
||||
src = 'gen'
|
||||
adata = self.generate(seed, addr_idxs if isinstance(addr_idxs,AddrIdxList) else AddrIdxList(addr_idxs))
|
||||
do_chksum = True
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class PasswordList(AddrList):
|
|||
if self.hex2bip39:
|
||||
ymsg(self.feature_warn_fs.format(pw_fmt))
|
||||
self.set_pw_len_vs_seed_len(pw_len,seed) # sets self.bip39, self.xmrseed, self.xmrproto self.baseconv
|
||||
self.al_id = AddrListID(seed.sid,MMGenPasswordType(self.proto,'P'))
|
||||
self.al_id = AddrListID( sid=seed.sid, mmtype=MMGenPasswordType(self.proto,'P') )
|
||||
self.data = self.generate(seed,pw_idxs)
|
||||
|
||||
self.num_addrs = len(self.data)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ proto.btc.daemon: Bitcoin base protocol daemon classes
|
|||
import os
|
||||
|
||||
from ...globalvars import g
|
||||
from ...opts import opt
|
||||
from ...util import list_gen
|
||||
from ...daemon import CoinDaemon,_nw,_dd
|
||||
|
||||
|
|
|
|||
|
|
@ -117,12 +117,14 @@ class New(Base,TxBase.New):
|
|||
|
||||
self.outputs.sort_bip69()
|
||||
|
||||
ret = await self.rpc.call(
|
||||
'createrawtransaction', [
|
||||
inputs_list = [
|
||||
{'txid':e.txid,'vout':e.vout,'sequence':e.sequence} if n == 0 and e.sequence else
|
||||
{'txid':e.txid,'vout':e.vout}
|
||||
for n,e in enumerate(self.inputs) ],
|
||||
{e.addr:e.amt for e in self.outputs} )
|
||||
for n,e in enumerate(self.inputs) ]
|
||||
|
||||
outputs_dict = {e.addr:e.amt for e in self.outputs}
|
||||
|
||||
ret = await self.rpc.call( 'createrawtransaction', inputs_list, outputs_dict )
|
||||
|
||||
if locktime and not bump:
|
||||
msg(f'Setting nLockTime to {self.strfmt_locktime(locktime)}!')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue