Fix daemon signTransaction nonce hardcoded to 0
This commit is contained in:
parent
fef79c4a32
commit
98a8e261b9
@ -1,3 +1,5 @@
|
||||
* 0.2.1
|
||||
- Fix hardcoded daemon signTransaction nonce
|
||||
* 0.2.0
|
||||
- Add import method to keystore interface
|
||||
* 0.1.1
|
||||
|
@ -52,13 +52,14 @@ def personal_new_account(p):
|
||||
|
||||
|
||||
def personal_sign_transaction(p):
|
||||
t = EIP155Transaction(p[0], 0, 8995)
|
||||
t = EIP155Transaction(p[0], p[0]['nonce'], 8995)
|
||||
z = signer.signTransaction(t, p[1])
|
||||
raw_signed_tx = t.rlp_serialize()
|
||||
o = {
|
||||
'raw': '0x' + raw_signed_tx.hex(),
|
||||
'tx': t.serialize(),
|
||||
}
|
||||
logg.debug('signed {}'.format(o))
|
||||
return o
|
||||
|
||||
|
||||
@ -122,7 +123,8 @@ def start_server():
|
||||
j = json.loads(d)
|
||||
is_valid_json(j)
|
||||
logg.debug('{}'.format(d.decode('utf-8')))
|
||||
except:
|
||||
except Exception as e:
|
||||
logg.error('input error {}'.format(e))
|
||||
csock.send(json.dumps(jsonrpc_error(None, JSONRPCParseError)).encode('utf-8'))
|
||||
csock.close()
|
||||
continue
|
||||
@ -132,7 +134,7 @@ def start_server():
|
||||
csock.send(json.dumps(jsonrpc_ok(rpc_id, r)).encode('utf-8'))
|
||||
except Exception as e:
|
||||
# TODO: handle cases to give better error context to caller
|
||||
logg.error('error {}'.format(e))
|
||||
logg.error('process error {}'.format(e))
|
||||
csock.send(json.dumps(jsonrpc_error(j['id'], JSONRPCServerError)).encode('utf-8'))
|
||||
|
||||
csock.close()
|
||||
|
Loading…
Reference in New Issue
Block a user