From 97647f23a6e72f141c0c54c0a69194947abbbece Mon Sep 17 00:00:00 2001 From: bmng-dev Date: Thu, 22 May 2014 16:33:42 +0000 Subject: [PATCH] Refactor header generation Modify generateFullAckMessage to use shared.CreatePacket --- src/class_singleWorker.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 18fdf9f3..8af012c3 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -948,8 +948,4 @@ class singleWorker(threading.Thread): pass payload = pack('>Q', nonce) + payload - headerData = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits. - headerData += 'msg\x00\x00\x00\x00\x00\x00\x00\x00\x00' - headerData += pack('>L', len(payload)) - headerData += hashlib.sha512(payload).digest()[:4] - return headerData + payload + return shared.CreatePacket('msg', payload)