Commit Graph

7 Commits

Author SHA1 Message Date
Dave Collins
76f6906e50
wire: Use new errors.Is capabilities in tests.
The error handling in the tests for the wire package were recently
updated to make use of the new errors.Is and errors.As standard library
functions introduced in Go 1.13, but they were only updated mechanically
as opposed to being updated to use the new capabilities of errors.Is
checking for a specific error code as opposed to just the error type.

Consequently, this updates the tests to remove all of the additional
type checking via errors.As and instead look for the exact expected
error code via errors.Is.  This change is desirable since only examining
the type of error doesn't prove that the test is actually hitting the
specific error it intends too, rather only that it is hitting an error
of the same type.

It also corrects a couple of tests and error returns that were
discovered to be incorrect in the process.
2020-05-02 23:40:00 -05:00
David Hill
7d7a66d8f3 wire: use std errors api 2020-05-01 22:56:35 -05:00
David Hill
4971faff25 multi: remove whitespace 2019-11-21 18:31:30 -06:00
Donald Adu-Poku
3c6ff2852d wire: assert MaxMessagePayload limit in tests.
This adds an additional check to Msg tests ensuring their max
payload lengths do not exceed MaxMessagePayload.
2019-06-20 12:28:41 -05:00
David Hill
20686cd775 travis: add gosimple linter 2017-11-20 18:49:55 -06:00
Dave Collins
6db6646fcb
wire/peer: Implement feefilter p2p message.
This contains the following upstream commits:
- ca4e9b82d6
- 9935fe5dba
- d009185a56

The merge commit modifies the protocol versions and the wire default
user agent version accordingly along with other minor changes in terms
of copyright dates and comment changes.
2017-08-01 21:59:11 -05:00
David Hill
ca4e9b82d6 wire: implement feefilter message (bip0133)
feefilter is used to request the receiving peer does not announce any
transactions below the specified minimum fee rate.
2016-10-17 13:33:16 -04:00