blocknet
blocknet copied to clipboard
[refactor] simplify XBridgePacket serialization
The XBridgePacket class is at the core of the xbridge communication layer. Currently, the implementation is quite complicated and error prone as the serialization and de-serialization happen all over the code base. Additionally, packages are often constructed "manually" with manual size calculations. This can easily introduce bugs when changing things and makes it difficult to review and test code properly.
I propose to simplify the class, consolidate relevant sections/methods into one place and find a better, more automated way to serialize the data (change, add, update certain data types),