Cory Fields
cbfc5a6728
net: require a verack before responding to anything else
...
7a8c251901 made this logic hard to follow. After that change, messages would
not be sent to a peer via SendMessages() before the handshake was complete, but
messages could still be sent as a response to an incoming message.
For example, if a peer had not yet sent a verack, we wouldn't notify it about
new blocks, but we would respond to a PING with a PONG.
This change makes the behavior straightforward: until we've received a verack,
never send any message other than version/verack/reject.
The behavior until a VERACK is received has always been undefined, this change
just tightens our policy.
This also makes testing much easier, because we can now connect but not send
version/verack, and anything sent to us is an error.
2017-02-13 18:55:35 -05:00
..
2017-02-07 19:07:29 +01:00
2016-12-31 11:01:21 -07:00
2017-01-27 21:22:35 +01:00
2017-01-12 11:52:45 -08:00
2016-12-01 16:14:45 -08:00
2017-01-16 19:33:08 +01:00
2017-01-04 12:23:10 +01:00
2017-02-06 14:20:05 +01:00
2017-02-02 17:32:27 -05:00
2017-01-27 21:22:35 +01:00
2016-12-12 11:08:47 -08:00
2017-01-05 11:11:17 +01:00
2017-02-05 17:37:13 +00:00
2016-09-30 19:58:11 +02:00
2017-02-06 16:14:17 +01:00
2016-12-31 11:01:21 -07:00
2017-01-28 16:57:08 +01:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-02-07 15:28:50 +01:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-01-27 21:22:35 +01:00
2017-01-10 12:04:54 +01:00
2017-01-12 12:24:35 +01:00
2016-12-31 11:01:21 -07:00
2017-01-16 22:58:06 -05:00
2017-01-27 21:22:35 +01:00
2017-01-27 18:13:20 +09:00
2016-12-31 11:01:21 -07:00
2017-01-27 18:13:20 +09:00
2017-01-12 14:21:43 +00:00
2017-01-13 15:42:24 +00:00
2017-01-11 08:21:37 -08:00
2017-01-04 13:18:49 -08:00
2017-01-04 13:18:49 -08:00
2016-12-31 11:01:21 -07:00
2017-01-23 23:46:06 +01:00
2017-01-04 14:56:17 -05:00
2017-01-04 11:56:17 -08:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-02-02 17:32:27 -05:00
2017-01-27 18:13:20 +09:00
2017-01-27 21:22:35 +01:00
2016-12-31 11:01:21 -07:00
2017-01-09 08:47:47 -08:00
2017-01-14 21:45:32 +01:00
2016-12-31 11:01:21 -07:00
2017-01-27 21:22:35 +01:00
2017-02-03 13:50:17 -05:00
2016-12-31 11:01:21 -07:00
2017-02-01 11:41:00 +01:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-01-05 11:11:17 +01:00
2017-01-09 14:07:02 -05:00
2016-09-29 17:27:28 +02:00
2017-01-11 13:45:28 +01:00
2016-12-17 12:27:00 +09:00
2017-01-12 13:41:32 +01:00
2016-12-31 11:01:21 -07:00
2017-01-27 18:13:20 +09:00
2016-12-31 11:01:21 -07:00
2017-01-27 18:13:20 +09:00
2017-01-04 13:24:19 -05:00
2017-02-13 18:55:35 -05:00
2017-01-31 23:45:47 +01:00
2017-02-06 14:34:53 +01:00
2017-02-06 14:34:53 +01:00
2016-12-31 11:01:21 -07:00
2017-01-27 21:22:35 +01:00
2017-01-04 12:21:53 +01:00
2017-01-04 12:21:53 +01:00
2017-01-31 23:29:28 +01:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-01-27 18:13:20 +09:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-01-09 08:47:47 -08:00
2016-12-31 11:01:21 -07:00
2017-01-05 19:02:09 +00:00
2017-01-03 17:53:09 -05:00
2017-01-03 17:53:09 -05:00
2017-01-27 18:13:20 +09:00
2016-12-31 11:01:21 -07:00
2017-01-27 21:22:35 +01:00
2017-01-27 18:13:20 +09:00
2016-12-31 11:01:21 -07:00
2017-02-05 12:08:08 -08:00
2017-01-27 21:22:35 +01:00
2016-09-26 01:11:27 +02:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-01-24 20:28:00 -05:00
2017-01-05 10:49:00 +01:00
2016-12-31 11:01:21 -07:00
2016-12-31 11:01:21 -07:00
2017-01-27 21:22:35 +01:00
2017-01-25 09:48:14 -05:00
2017-01-30 13:13:20 +01:00
2017-01-19 09:03:46 +01:00
2017-01-05 10:32:07 -05:00
2017-01-23 15:43:22 -05:00
2016-12-31 11:01:21 -07:00
2016-10-19 09:08:39 -04:00
2016-10-19 09:08:39 -04:00
2016-12-03 07:17:34 +00:00
2016-12-03 07:17:34 +00:00