commit
d0676233ed
|
@ -479,7 +479,7 @@ class receiveDataThread(threading.Thread):
|
|||
payload, = row
|
||||
self.sendObject(payload)
|
||||
else:
|
||||
logger.warning('%s asked for an object with a getdata which is not in either our memory inventory or our SQL inventory. We probably cleaned it out after advertising it but before they got around to asking for it.' % self.peer)
|
||||
logger.warning('%s asked for an object with a getdata which is not in either our memory inventory or our SQL inventory. We probably cleaned it out after advertising it but before they got around to asking for it.' % (self.peer,))
|
||||
|
||||
# Our peer has requested (in a getdata message) that we send an object.
|
||||
def sendObject(self, payload):
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
import threading
|
||||
import shared
|
||||
import time
|
||||
|
|
|
@ -71,6 +71,7 @@ def _doFastPoW(target, initialHash):
|
|||
time.sleep(0.2)
|
||||
|
||||
def run(target, initialHash):
|
||||
target = int(target)
|
||||
if frozen == "macosx_app" or not frozen:
|
||||
return _doFastPoW(target, initialHash)
|
||||
else:
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import division
|
||||
|
||||
softwareVersion = '0.4.4'
|
||||
verbose = 1
|
||||
maximumAgeOfAnObjectThatIAmWillingToAccept = 216000 # This is obsolete with the change to protocol v3 but the singleCleaner thread still hasn't been updated so we need this a little longer.
|
||||
|
@ -589,7 +591,7 @@ def checkAndShareObjectWithPeers(data):
|
|||
"""
|
||||
if len(data) > 2 ** 18:
|
||||
logger.info('The payload length of this object is too large (%s bytes). Ignoring it.' % len(data))
|
||||
return
|
||||
return 0
|
||||
# Let us check to make sure that the proof of work is sufficient.
|
||||
if not isProofOfWorkSufficient(data):
|
||||
logger.info('Proof of work is insufficient.')
|
||||
|
@ -661,6 +663,9 @@ def _checkAndShareUndefinedObjectWithPeers(data):
|
|||
def _checkAndShareMsgWithPeers(data):
|
||||
embeddedTime, = unpack('>Q', data[8:16])
|
||||
readPosition = 20 # bypass nonce, time, and object type
|
||||
objectVersion, objectVersionLength = decodeVarint(
|
||||
data[readPosition:readPosition + 9])
|
||||
readPosition += objectVersionLength
|
||||
streamNumber, streamNumberLength = decodeVarint(
|
||||
data[readPosition:readPosition + 9])
|
||||
if not streamNumber in streamsInWhichIAmParticipating:
|
||||
|
|
Reference in New Issue
Block a user