Merge pull request #1211 from mikeland86/master

Fix createrawtransaction and add missing deserialize() calls
This commit is contained in:
ThomasV 2015-05-13 15:18:03 +02:00
commit e927766698
1 changed files with 3 additions and 1 deletions

View File

@ -173,7 +173,7 @@ class Commands:
else:
raise BaseException('Transaction output not in wallet', prevout_hash+":%d"%prevout_n)
outputs = map(lambda x: ('address', x[0], int(1e8*x[1])), outputs.items())
tx = Transaction(tx_inputs, outputs)
tx = Transaction.from_io(tx_inputs, outputs)
return tx
def signtxwithkey(self, raw_tx, sec):
@ -184,11 +184,13 @@ class Commands:
def signtxwithwallet(self, raw_tx):
tx = Transaction(raw_tx)
tx.deserialize()
self.wallet.sign_transaction(tx, self.password)
return tx
def decoderawtransaction(self, raw):
tx = Transaction(raw)
tx.deserialize()
return {'inputs':tx.inputs, 'outputs':tx.outputs}
def sendrawtransaction(self, raw):