commit 44c62a658b5856571415abf1bd33e646a9fa6918
parent fef79c4a32e3749d21160fc653f4fe42123c3e73
Author: Louis Holbrook <accounts-gitlab@holbrook.no>
Date: Tue, 22 Sep 2020 09:37:14 +0000
Merge branch 'lash/daemon-nonce' into 'master'
Fix daemon signTransaction nonce hardcoded to 0
See merge request nolash/crypto-dev-signer!3
Diffstat:
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,5 @@
+* 0.2.1
+ - Fix hardcoded daemon signTransaction nonce
* 0.2.0
- Add import method to keystore interface
* 0.1.1
diff --git a/scripts/crypto-dev-daemon b/scripts/crypto-dev-daemon
@@ -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()
diff --git a/setup.py b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="crypto-dev-signer",
- version="0.2.0",
+ version="0.2.1",
description="A signer and keystore daemon and library for cryptocurrency software development",
author="Louis Holbrook",
author_email="dev@holbrook.no",