Copy object contents from buffers on instantiation
- this may fix some memory issues
This commit is contained in:
parent
3c3d69e5de
commit
4690dd6f00
|
@ -40,8 +40,9 @@ class BMObject(object):
|
|||
self.version = version
|
||||
self.streamNumber = streamNumber
|
||||
self.inventoryHash = calculateInventoryHash(data)
|
||||
self.data = data
|
||||
self.tag = data[payloadOffset:payloadOffset+32]
|
||||
# copy to avoid memory issues
|
||||
self.data = bytearray(data)
|
||||
self.tag = self.data[payloadOffset:payloadOffset+32]
|
||||
|
||||
def checkProofOfWorkSufficient(self):
|
||||
# Let us check to make sure that the proof of work is sufficient.
|
||||
|
|
Reference in New Issue
Block a user