added error handling for when client auto-resends a message but user has... #27

Merged
Atheros1 merged 1 commits from ecc into ecc 2013-01-25 19:30:58 +01:00
Showing only changes of commit 12f03fc891 - Show all commits

View File

@ -1726,7 +1726,9 @@ class receiveDataThread(QThread):
#Sends a verack message #Sends a verack message
def sendverack(self): def sendverack(self):
printLock.acquire()
print 'Sending verack' print 'Sending verack'
printLock.release()
self.sock.sendall('\xE9\xBE\xB4\xD9\x76\x65\x72\x61\x63\x6B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35') self.sock.sendall('\xE9\xBE\xB4\xD9\x76\x65\x72\x61\x63\x6B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x83\xe1\x35')
#cf 83 e1 35 #cf 83 e1 35
self.verackSent = True self.verackSent = True
@ -2441,7 +2443,13 @@ class singleWorker(QThread):
payload += encodeVarint(fromAddressVersionNumber) payload += encodeVarint(fromAddressVersionNumber)
payload += encodeVarint(fromStreamNumber) payload += encodeVarint(fromStreamNumber)
try:
sendersN = convertIntToString(config.getint(fromaddress, 'n')) sendersN = convertIntToString(config.getint(fromaddress, 'n'))
except:
printLock.acquire()
print 'Error: Could not find', fromaddress, 'in our keys.dat file. You must have deleted it. Aborting the send.'
printLock.release()
return
payload += encodeVarint(len(sendersN)) payload += encodeVarint(len(sendersN))
payload += sendersN payload += sendersN