Refactor header generation

Modify generateFullAckMessage to use shared.CreatePacket
This commit is contained in:
bmng-dev 2014-05-22 16:33:42 +00:00
parent 1f75047223
commit 97647f23a6

View File

@ -948,8 +948,4 @@ class singleWorker(threading.Thread):
pass pass
payload = pack('>Q', nonce) + payload payload = pack('>Q', nonce) + payload
headerData = '\xe9\xbe\xb4\xd9' # magic bits, slighly different from Bitcoin's magic bits. return shared.CreatePacket('msg', payload)
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