cleanup (dead code)
This commit is contained in:
parent
0636ef8b32
commit
85505c1d8e
|
@ -597,8 +597,6 @@ class Transaction:
|
||||||
|
|
||||||
def is_complete(self):
|
def is_complete(self):
|
||||||
for i, txin in enumerate(self.inputs):
|
for i, txin in enumerate(self.inputs):
|
||||||
#redeem_script = txin.get('redeemScript')
|
|
||||||
#num, redeem_pubkeys = parse_redeemScript(redeem_script) if redeem_script else (1, [txin.get('redeemPubkey')])
|
|
||||||
pubkeys = txin['pubkeys']
|
pubkeys = txin['pubkeys']
|
||||||
signatures = txin.get("signatures",{})
|
signatures = txin.get("signatures",{})
|
||||||
if len(signatures) == txin['num_sig']:
|
if len(signatures) == txin['num_sig']:
|
||||||
|
@ -614,15 +612,9 @@ class Transaction:
|
||||||
|
|
||||||
for i, txin in enumerate(self.inputs):
|
for i, txin in enumerate(self.inputs):
|
||||||
|
|
||||||
# if the input is multisig, parse redeem script
|
|
||||||
#redeem_script = txin.get('redeemScript')
|
|
||||||
#num, redeem_pubkeys = parse_redeemScript(redeem_script) if redeem_script else (1, [txin.get('redeemPubkey')])
|
|
||||||
redeem_pubkeys = txin['pubkeys']
|
redeem_pubkeys = txin['pubkeys']
|
||||||
num = len(redeem_pubkeys)
|
num = len(redeem_pubkeys)
|
||||||
|
|
||||||
# add pubkeys
|
|
||||||
### txin["pubkeys"] = redeem_pubkeys
|
|
||||||
|
|
||||||
# get list of already existing signatures
|
# get list of already existing signatures
|
||||||
signatures = txin.get("signatures",{})
|
signatures = txin.get("signatures",{})
|
||||||
# continue if this txin is complete
|
# continue if this txin is complete
|
||||||
|
|
|
@ -1592,28 +1592,6 @@ class OldWallet(Deterministic_Wallet):
|
||||||
s = self.get_seed(password)
|
s = self.get_seed(password)
|
||||||
return ' '.join(mnemonic.mn_encode(s))
|
return ' '.join(mnemonic.mn_encode(s))
|
||||||
|
|
||||||
|
|
||||||
def add_keypairs_from_KeyID(self, tx, keypairs, password):
|
|
||||||
# first check the provided password
|
|
||||||
for txin in tx.inputs:
|
|
||||||
keyid = txin.get('KeyID')
|
|
||||||
if keyid:
|
|
||||||
m = re.match("old\(([0-9a-f]+),(\d+),(\d+)", keyid)
|
|
||||||
if not m: continue
|
|
||||||
mpk = m.group(1)
|
|
||||||
if mpk != self.storage.get('master_public_key'): continue
|
|
||||||
for_change = int(m.group(2))
|
|
||||||
num = int(m.group(3))
|
|
||||||
account = self.accounts[0]
|
|
||||||
addr = account.get_address(for_change, num)
|
|
||||||
txin['address'] = addr # fixme: side effect
|
|
||||||
pk = account.get_private_key((for_change, num), self, password)
|
|
||||||
for sec in pk:
|
|
||||||
pubkey = public_key_from_private_key(sec)
|
|
||||||
keypairs[pubkey] = sec
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def check_pending_accounts(self):
|
def check_pending_accounts(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue