Demote payloadLength from class instance variable to processData local variable as no other function was using it
Improve processData:
-Utilise shared.Header
-Use a memoryview to reduce memory overhead
-Clean up variables before a recursive call
-Strip null bytes from command
Refactor sendData
Various functions:
-Use shared.CreatePacket to generate packets
Fix typo in _checkIPv4Address
Refactored ackDataHasAVaildHeader:
-shared.Header is used as necessary
-avoided slicing wherever possible
-remove trailing null characters when comparing command strings
-don't calculate the checksum of a large payload
Added global variable Header - a compiled Struct to pack/unpack headers so as to avoid repeatedly compiling the same format string
Add a new method CreatePacket to simply and efficiently construct a packet that is ready to be sent
Modify assembleVersionMessage to use CreatePacket
pointMult is faster than the pure python arithmetic.privtopub
Additionally in makeCryptor the call to a.privtopub could have just simply be changed to call the local privToPub but then privkey would have been dehexified twice (once in makeCryptor, then again in privToPub) and privToPub would have hexified its result only for makeCryptor to immediately dehexify it. This sort of unnecessary hexifying/dehexifying seems to occur throughout PyBitmessage.
* Move global variable declaration to prevent warnings
* Fix Address Book and Subscriptions entry prepending
* Fix shared.fixPotentiallyInvalidUTF8Data() corrupting sent subjects and message bodies
+ Add code to delete address from Your Identities
+ Add code to load Sentbox, Subscriptions, and Blacklist
* Lengthen column width from 30 to 40 to better fit unlabeled addresses and long subject lines
* Fix row overflow support
* Reorder Dialog initialization to remove duplicate code
* Add reply argument to sendMessage()
* Add newline to Move to Trash message
* Replace Your Identities address copy option with an option to send a message
+ Add function ascii() to strip non-ASCII characters
+ Add Inbox, Send, and Address Book tabs support
+ Add Home and End key handling to allow skipping to the top or bottom of tables
+ Add sendMessage() function so replies are easier and code is not duplicated
+ Add screen clear before initial draw in order to get rid of the default background color
* Fix resetlookups() by allowing access to global inventorydata
* Shorten resetlookups() Timer to 1 second
* Fix table display when output requires scrolling
* Change table column width from 50 to 30
- Remove conditional naptime by using blocking input with 1 second timeout
- Remove stderr capturing for development purposes