Refactor header generation
Modify generateFullAckMessage to use shared.CreatePacket
This commit is contained in:
parent
1f75047223
commit
97647f23a6
|
@ -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
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user