zk-protocol
zk-protocol copied to clipboard
fix checksum calculation code
When summing the higher two bytes with the lower two bytes, that results sometimes to an overflow, meaning the result is bigger than 0xffff (16 bit). This way we keep folding the upper bytes until we end up with a 16 bit checksum