Open peacekeeper opened 9 years ago
in serialize_sign_and_broadcast() in transactions/network.py, sign_transaction() is only called on the first input (index 0):
def serialize_sign_and_broadcast(inputs, outputs, private_key, blockchain_client=BlockchainInfoClient()): # extract the private key object private_key_obj = get_private_key_obj(private_key) # serialize the transaction unsigned_tx = serialize_transaction(inputs, outputs) # sign the unsigned transaction with the private key signed_tx = sign_transaction(unsigned_tx, 0, private_key_obj.to_hex()) # dispatch the signed transction to the network response = broadcast_transaction(signed_tx, blockchain_client) # return the response return response
therefore transactions that require multiple inputs become invalid
Hi @peacekeeper,
This problem has been fixed in my branch (https://github.com/blockstack/pybitcoin/tree/jcnelson-master).
in serialize_sign_and_broadcast() in transactions/network.py, sign_transaction() is only called on the first input (index 0):
therefore transactions that require multiple inputs become invalid