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
|
* 0.2.0
|
||||||
- Add import method to keystore interface
|
- Add import method to keystore interface
|
||||||
* 0.1.1
|
* 0.1.1
|
||||||
|
@ -52,13 +52,14 @@ def personal_new_account(p):
|
|||||||
|
|
||||||
|
|
||||||
def personal_sign_transaction(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])
|
z = signer.signTransaction(t, p[1])
|
||||||
raw_signed_tx = t.rlp_serialize()
|
raw_signed_tx = t.rlp_serialize()
|
||||||
o = {
|
o = {
|
||||||
'raw': '0x' + raw_signed_tx.hex(),
|
'raw': '0x' + raw_signed_tx.hex(),
|
||||||
'tx': t.serialize(),
|
'tx': t.serialize(),
|
||||||
}
|
}
|
||||||
|
logg.debug('signed {}'.format(o))
|
||||||
return o
|
return o
|
||||||
|
|
||||||
|
|
||||||
@ -122,7 +123,8 @@ def start_server():
|
|||||||
j = json.loads(d)
|
j = json.loads(d)
|
||||||
is_valid_json(j)
|
is_valid_json(j)
|
||||||
logg.debug('{}'.format(d.decode('utf-8')))
|
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.send(json.dumps(jsonrpc_error(None, JSONRPCParseError)).encode('utf-8'))
|
||||||
csock.close()
|
csock.close()
|
||||||
continue
|
continue
|
||||||
@ -132,7 +134,7 @@ def start_server():
|
|||||||
csock.send(json.dumps(jsonrpc_ok(rpc_id, r)).encode('utf-8'))
|
csock.send(json.dumps(jsonrpc_ok(rpc_id, r)).encode('utf-8'))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# TODO: handle cases to give better error context to caller
|
# 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.send(json.dumps(jsonrpc_error(j['id'], JSONRPCServerError)).encode('utf-8'))
|
||||||
|
|
||||||
csock.close()
|
csock.close()
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="crypto-dev-signer",
|
name="crypto-dev-signer",
|
||||||
version="0.2.0",
|
version="0.2.1",
|
||||||
description="A signer and keystore daemon and library for cryptocurrency software development",
|
description="A signer and keystore daemon and library for cryptocurrency software development",
|
||||||
author="Louis Holbrook",
|
author="Louis Holbrook",
|
||||||
author_email="dev@holbrook.no",
|
author_email="dev@holbrook.no",
|
||||||
|
Loading…
Reference in New Issue
Block a user