Commit graph

2131 commits

Author SHA1 Message Date
Dave Collins
e41a3bcaf3 Correct a couple of func prefixes in err messages. 2013-05-10 11:31:06 -05:00
Dave Collins
d33fdb2c3c Add additional doco on how btcwire relates to btcd. 2013-05-10 11:04:30 -05:00
Dave Collins
29cd3a7246 Fix comment typo in test coverage report script. 2013-05-10 10:31:39 -05:00
Dave Collins
72fa9f4b7b Update test coverage report. 2013-05-10 10:18:34 -05:00
Dave Collins
59d64ee076 Add negative tests for MsgInv.
This commit adds tests for the error paths when encoded and decoding
MsgInv.
2013-05-10 10:14:13 -05:00
Dave Collins
036f14ff49 Convert MsgInv errors to new MessageError type. 2013-05-10 10:12:45 -05:00
Dave Collins
953a236e2a Add negative tests for MsgBlock.
This commit adds tests for the error paths when encoded and decoding
MsgBlock.
2013-05-10 09:12:46 -05:00
Dave Collins
862374115f Bump the protocol version to 70001.
As documented in the package overview, this package does not yet support
BIP0037 which was the reason for this bump.
2013-05-10 00:54:56 -05:00
Dave Collins
e026f50486 Improve MsgGetBlocks tests.
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.
2013-05-10 00:44:55 -05:00
Dave Collins
135552cd72 Improve MsgBlock tests.
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.
2013-05-09 23:47:12 -05:00
Dave Collins
4aea957b19 Add negative tests for NetAddress.
This commit adds tests for the error paths when encoding and
decoding NetAddress with and without the timestamp field.
2013-05-09 23:01:09 -05:00
Dave Collins
2aee754448 Add test for discarding invalid large messages. 2013-05-09 22:25:21 -05:00
Dave Collins
f182e4f323 Correct error output colon string placement. 2013-05-09 21:25:19 -05:00
Dave Collins
e7abb08b6b Fix a comment typo. 2013-05-09 21:24:47 -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
aa4086a1b1 Update test coverage report. 2013-05-09 21:13:37 -05:00
Dave Collins
ec6ebb3916 Add initial implementation of MessageError type.
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.
2013-05-09 20:58:17 -05:00
Dave Collins
6286a39378 Combine readMessage with ReadMessage.
These functions used to be split into multiple files, but since the code
was reorganized there is no longer any reason to split them.
2013-05-09 20:16:46 -05:00
Dave Collins
d829f688b9 Fix comment typo. 2013-05-09 18:12:11 -05:00
Dave Collins
970b9c129d Remove dead error check.
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.
2013-05-09 15:23:31 -05:00
Dave Collins
4c160efc96 Fix a minor typo in the package overview doco. 2013-05-09 13:57:44 -05:00
Matthew Dempsky
4fc0089f63 Fix typo: s/MsgPong/MsgPing/ 2013-05-09 12:26:23 -06:00
Dave Collins
cdc17121b8 Display correct import path for gocov.
This was pointed out by kaptin on IRC.
2013-05-09 13:19:09 -05:00
Dave Collins
c369c0c16e Correct discardInput comment for buffer size.
This was pointed out by kaptin on IRC.
2013-05-09 13:00:00 -05:00
Dave Collins
3cd90355df Correct error output string colon placement. 2013-05-09 11:36:29 -05:00
Dave Collins
5e416389b1 Add negative tests for MsgPing.
This commit add tests the error paths when encoding and decoding MsgPing.
2013-05-09 10:42:52 -05:00
Dave Collins
bf5c0b58d8 Fix a few comment typos. 2013-05-09 00:02:07 -05:00
Dave Collins
e473fd6eb8 Add message tests for MsgAlert and MsgMemPool. 2013-05-09 00:01:29 -05:00
Dave Collins
ff7d582c66 Remove a few unused variables and constants. 2013-05-08 22:59:45 -05:00
Dave Collins
69b27dd5d3 Initial implementation. 2013-05-08 18:58:29 -05:00
Dave Collins
b4ebd0057b Initial commit. 2013-05-08 14:16:41 -05:00