This commit corrects the MsgGetBlocks tests so that the protocol version
in the multiLocators data matches the wire encoded test data. This will
help future proof the tests against protocol changes. Also, while here
modify the casing of the local vars to be consistent.
This commit corrects the tests so that the main API functions are tested
against the latest protocol version, but the TxSha and BlockSha functions
are run against the specific protocol version used to encode the test
data. This will help future proof the tests against protocol changes.
This commit adds a new MessageError type that is intended to allow the
caller to differentiate between general io errors and and errors that
resulted from malformed messages.
The io.ReadFull function always returns an error if the full payload can't
be read, so there is no reason to further check if the payload length
matches after a successful read.