From cef8de289df4ce76af817f007f2cbd73673bda04 Mon Sep 17 00:00:00 2001 From: Sylvain Bellemare Date: Tue, 15 May 2018 01:24:34 +0200 Subject: [PATCH] fix: pyflakes F841 local variable name is assigned to but never used Ref: http://flake8.pycqa.org/en/latest/user/error-codes.html#error-violation-codes --- honeybadgerbft/core/honeybadger.py | 6 +++--- honeybadgerbft/crypto/ecdsa/ecdsa_ssl.py | 25 +++++++++++++----------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/honeybadgerbft/core/honeybadger.py b/honeybadgerbft/core/honeybadger.py index 8ccc165..acd817e 100644 --- a/honeybadgerbft/core/honeybadger.py +++ b/honeybadgerbft/core/honeybadger.py @@ -201,9 +201,9 @@ def aba_bcast(o): broadcast(('ACS_ABA', j, o)) aba_recvs[j] = Queue() - aba = gevent.spawn(binaryagreement, sid+'ABA'+str(j), pid, N, f, coin, - aba_inputs[j].get, aba_outputs[j].put_nowait, - aba_bcast, aba_recvs[j].get) + gevent.spawn(binaryagreement, sid+'ABA'+str(j), pid, N, f, coin, + aba_inputs[j].get, aba_outputs[j].put_nowait, + aba_bcast, aba_recvs[j].get) def rbc_send(k, o): """Reliable broadcast operation. diff --git a/honeybadgerbft/crypto/ecdsa/ecdsa_ssl.py b/honeybadgerbft/crypto/ecdsa/ecdsa_ssl.py index cc0278e..4bb45ed 100644 --- a/honeybadgerbft/crypto/ecdsa/ecdsa_ssl.py +++ b/honeybadgerbft/crypto/ecdsa/ecdsa_ssl.py @@ -113,17 +113,20 @@ def main(): # ethalone keys ec_secret = '' + \ 'a0dc65ffca799873cbea0ac274015b9526505daaaed385155425f7337704883e' - ec_private = '308201130201010420' + \ - 'a0dc65ffca799873cbea0ac274015b9526505daaaed385155425f7337704883e' + \ - 'a081a53081a2020101302c06072a8648ce3d0101022100' + \ - 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f' + \ - '300604010004010704410479be667ef9dcbbac55a06295ce870b07029bfcdb2d' + \ - 'ce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a6' + \ - '8554199c47d08ffb10d4b8022100' + \ - 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141' + \ - '020101a14403420004' + \ - '0791dc70b75aa995213244ad3f4886d74d61ccd3ef658243fcad14c9ccee2b0a' + \ - 'a762fbc6ac0921b8f17025bb8458b92794ae87a133894d70d7995fc0b6b5ab90' + + # TODO: cleanup ... variable ``ec_private`` is unused but its value may + # be of some use, so leaving there for now. + # ec_private = '308201130201010420' + \ + # 'a0dc65ffca799873cbea0ac274015b9526505daaaed385155425f7337704883e' + \ + # 'a081a53081a2020101302c06072a8648ce3d0101022100' + \ + # 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f' + \ + # '300604010004010704410479be667ef9dcbbac55a06295ce870b07029bfcdb2d' + \ + # 'ce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a6' + \ + # '8554199c47d08ffb10d4b8022100' + \ + # 'fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141' + \ + # '020101a14403420004' + \ + # '0791dc70b75aa995213244ad3f4886d74d61ccd3ef658243fcad14c9ccee2b0a' + \ + # 'a762fbc6ac0921b8f17025bb8458b92794ae87a133894d70d7995fc0b6b5ab90' k = KEY() k.generate(ec_secret.decode('hex'))