Commit graph

6 commits

Author SHA1 Message Date
Dave Collins
14a1da417f Enforce max block payload size of 1MB.
This commit changes MsgBlock to enforce a 1MB max payload per the spec.
Previously it was only limited to the max overall message size.  While
here, also enforce max payloads per message type (instead of only the max
overall message payload) when writing messages.
2013-05-16 09:07:04 -05:00
Dave Collins
c9d2dfea3d Add negative tests for WriteMessage.
This commit adds tests for the error paths when writing a message
to the wire.
2013-05-11 23:34:10 -05:00
Dave Collins
2aee754448 Add test for discarding invalid large messages. 2013-05-09 22:25:21 -05:00
Dave Collins
149d77ad3f Add negative tests for ReadMessage.
This commit adds tests for the error paths when reading the initial
message header and message payload from the wire.
2013-05-09 21:23:06 -05:00
Dave Collins
e473fd6eb8 Add message tests for MsgAlert and MsgMemPool. 2013-05-09 00:01:29 -05:00
Dave Collins
69b27dd5d3 Initial implementation. 2013-05-08 18:58:29 -05:00