|
|
@ -744,7 +744,6 @@ if __name__ == '__main__': |
|
|
|
|
|
|
|
|
|
|
|
elif cmd == 'signrawtransaction': |
|
|
|
from lib.bitcoin import * |
|
|
|
tx = Transaction(args[1]) |
|
|
|
txouts = ast.literal_eval(args[2]) if len(args)>2 else [] |
|
|
|
private_keys = ast.literal_eval(args[3]) if len(args)>3 else {} |
|
|
@ -758,9 +757,6 @@ if __name__ == '__main__': |
|
|
|
|
|
|
|
for txout in txouts: |
|
|
|
if txout.get('txid') == txid and txout.get('vout') == index: |
|
|
|
# compute addr from redeemScript |
|
|
|
addr = hash_160_to_bc_address(hash_160(txout['redeemScript'].decode('hex')),5) |
|
|
|
txin['address'] = addr |
|
|
|
txin['raw_output_script'] = txout['scriptPubKey'] |
|
|
|
txin['redeemScript'] = txout['redeemScript'] |
|
|
|
break |
|
|
|