Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
In Bitcoin Core v0.12.1 a PR was merged to add
this is an edge case, there's been 250 CP TXs with > 80 bytes in the history of CP;
I'm talking to core devs to get this fixed in core, hopefully for the next release, but before v0.12.1 is widely adopted we need a fix for this that we keep in place until v0.12.1 is phased out.
This PR consists of 2 fallbacks to deal with this problem:
…cast text messages. the old way had an issue when the string was exactly the switch point (52), because it turned into a 53 long string (+1 from length byte) and that resulted in length byte becoming part of the result. now always use a varint to specify the length.