#Cannot decode incoming broadcast versions higher than 2. Assuming the sender isn\' being silly, you should upgrade Bitmessage because this message shall be ignored.
print'Cannot decode incoming broadcast versions higher than 2. Assuming the sender isn\' being silly, you should upgrade Bitmessage because this message shall be ignored.'
return
ifbroadcastVersion==1:
beginningOfPubkeyPosition=readPosition#used when we add the pubkey to our pubkey table
@ -704,9 +704,8 @@ class receiveDataThread(QThread):
print'The string that we will hash to make the privEncryptionKey is',(encodeVarint(addressVersionNumber)+encodeVarint(streamNumber)+ripe).encode('hex')
@ -2964,8 +2992,13 @@ class singleWorker(QThread):
payload+=pubSigningKey[1:]#The \x04 on the beginning of the public keys are not sent. This way there is only one acceptable way to encode and send a public key.
payload+=pubEncryptionKey[1:]
payload+=encodeVarint(config.getint(fromaddress,'noncetrialsperbyte'))#todo: check and see whether the addressee is in our address book, subscription list, or whitelist and set lower POW requirement if yes.
#If the receiver of our message is in our address book, subscriptions list, or whitelist then we will allow them to do the network-minimum proof of work. Let us check to see if the receiver is in any of those lists.
payload+=toHash#This hash will be checked by the receiver of the message to verify that toHash belongs to them. This prevents a Surreptitious Forwarding Attack.
payload+='\x02'#Type 2 is simple UTF-8 message encoding as specified on the Protocol Specification on the Bitmessage Wiki.
@ -3024,17 +3057,11 @@ class singleWorker(QThread):
nonce=0
trialValue=99999999999999999999
encodedStreamNumber=encodeVarint(toStreamNumber)
#We are now dropping the unencrypted data in payload since it has already been encrypted and replacing it with the encrypted payload that we will send out.
print'The required total difficulty is',float(requiredAverageProofOfWorkNonceTrialsPerByte)/networkDefaultProofOfWorkNonceTrialsPerByte
print'The required small message difficulty is',float(requiredPayloadLengthExtraBytes)/networkDefaultPayloadLengthExtraBytes
print'(For msg message) Doing proof of work. Total required difficulty:',float(requiredAverageProofOfWorkNonceTrialsPerByte)/networkDefaultProofOfWorkNonceTrialsPerByte,'Required small message difficulty:',float(requiredPayloadLengthExtraBytes)/networkDefaultPayloadLengthExtraBytes