Fix the error: locktime is always reset to zero when serialize the json data

The "lockTime" field in the json object was ignored due to the wrong attribute name "locktime" was called.
This commit is contained in:
Laser Yuan 2018-03-16 12:06:33 +08:00 committed by GitHub
parent c0ae266d39
commit 8a5d27dcf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,7 +201,7 @@ class Commands:
keypairs = {}
inputs = jsontx.get('inputs')
outputs = jsontx.get('outputs')
locktime = jsontx.get('locktime', 0)
locktime = jsontx.get('lockTime', 0)
for txin in inputs:
if txin.get('output'):
prevout_hash, prevout_n = txin['output'].split(':')