- make the pull request against the ["v0.6" branch](https://github.com/Bitmessage/PyBitmessage/tree/v0.6)
- it should be possible to do a fast-forward merge of the pull requests
- PGP-sign the commits included in the pull request
- try to use a good editor that removes trailing whitespace, highlights potential python issues and uses unix line endings
- You can get paid for merged commits if you register at [Tip4Commit](https://tip4commit.com/github/Bitmessage/PyBitmessage)
If for some reason you don't want to use github, you can submit the patch using Bitmessage to the "bitmessage" chan, or to one of the developers.
## Translations
For helping with translations, please use [Transifex](https://www.transifex.com/bitmessage-project/pybitmessage/). There is no need to submit pull requests for translations.
For translating technical terms it is recommended to consult the [Microsoft Language Portal](https://www.microsoft.com/Language/en-US/Default.aspx).
For translating technical terms it is recommended to consult the [Microsoft Language Portal](https://www.microsoft.com/Language/en-US/Default.aspx).
sqlExecute('UPDATE sent SET status=?, lastactiontime=? WHERE ackdata=?',
'ackreceived',
int(time.time()),
int(time.time()),
data[readPosition:])
queues.UISignalQueue.put(('updateSentItemStatusByAckdata',(data[readPosition:],tr._translate("MainWindow",'Acknowledgement of the message received %1').arg(l10n.formatTimestamp()))))
else:
logger.debug('This object is not an acknowledgement bound for me.')
defprocessgetpubkey(self,data):
iflen(data)>200:
logger.info('getpubkey is abnormally long. Sanity check failed. Ignoring object.')
@ -173,9 +168,9 @@ class objectProcessor(threading.Thread):
except:
lastPubkeySendTime=0
iflastPubkeySendTime>time.time()-2419200:# If the last time we sent our pubkey was more recent than 28 days ago...
logger.info('Found getpubkey-requested-item in my list of EC hashes BUT we already sent it recently. Ignoring request. The lastPubkeySendTime is: %s'%lastPubkeySendTime)
logger.info('Found getpubkey-requested-item in my list of EC hashes BUT we already sent it recently. Ignoring request. The lastPubkeySendTime is: %s'%lastPubkeySendTime)
return
logger.info('Found getpubkey-requested-hash in my list of EC hashes. Telling Worker thread to do the POW for a pubkey message and send it out.')
logger.info('Found getpubkey-requested-hash in my list of EC hashes. Telling Worker thread to do the POW for a pubkey message and send it out.')
ifrequestedAddressVersionNumber==2:
queues.workerQueue.put((
'doPOWForMyV2Pubkey',requestedHash))
@ -191,7 +186,6 @@ class objectProcessor(threading.Thread):
shared.numberOfPubkeysProcessed+=1
queues.UISignalQueue.put((
'updateNumberOfPubkeysProcessed','no data'))
embeddedTime,=unpack('>Q',data[8:16])
readPosition=20# bypass the nonce, time, and object type
addressVersion,varintLength=decodeVarint(
data[readPosition:readPosition+10])
@ -209,7 +203,6 @@ class objectProcessor(threading.Thread):
iflen(data)<146:# sanity check. This is the minimum possible length.
logger.debug('(within processpubkey) payloadLength less than 146. Sanity check failed.')
@ -621,17 +608,15 @@ class objectProcessor(threading.Thread):
data[readPosition:readPosition+9])
readPosition+=broadcastVersionLength
ifbroadcastVersion<4orbroadcastVersion>5:
logger.info('Cannot decode incoming broadcast versions less than 4 or higher than 5. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.')
logger.info('Cannot decode incoming broadcast versions less than 4 or higher than 5. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.')
@ -643,7 +628,7 @@ class objectProcessor(threading.Thread):
toRipe=key# This is the RIPE hash of the sender's pubkey. We need this below to compare to the RIPE hash of the sender's address to verify that it was encrypted by with their key rather than some other key.
initialDecryptionSuccessful=True
logger.info('EC decryption successful using key associated with ripe hash: %s'%hexlify(key))
exceptExceptionaserr:
exceptException:
pass
# print 'cryptorObject.decrypt Exception:', err
ifnotinitialDecryptionSuccessful:
@ -654,7 +639,7 @@ class objectProcessor(threading.Thread):
logger.debug('Broadcast version %s decryption Unsuccessful.'%broadcastVersion)
exceptException:
logger.debug('Broadcast version %s decryption Unsuccessful.'%broadcastVersion)
return
# At this point this is a broadcast I have decrypted and am
# interested in.
@ -676,16 +661,15 @@ class objectProcessor(threading.Thread):
return
elifbroadcastVersion==5:
ifsendersAddressVersion<4:
logger.info('Cannot decode senderAddressVersion less than 4 for broadcast version number 5. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.')
logger.info('Cannot decode senderAddressVersion less than 4 for broadcast version number 5. Assuming the sender isn\'t being silly, you should upgrade Bitmessage because this message shall be ignored.')
return
readPosition+=sendersAddressVersionLength
sendersStream,sendersStreamLength=decodeVarint(
decryptedData[readPosition:readPosition+9])
ifsendersStream!=cleartextStreamNumber:
logger.info('The stream number outside of the encryption on which the POW was completed doesn\'t match the stream number inside the encryption. Ignoring broadcast.')
logger.info('The stream number outside of the encryption on which the POW was completed doesn\'t match the stream number inside the encryption. Ignoring broadcast.')