Commit 770c031
committed
net: attempt v2 transport for manual connections if we support it
This affects manual connections made either with -connect, or with
-addnode provided as a bitcoind config arg (the addnode RPC has an
extra option for v2).
We don't necessarily know if our peer supports v2, but will reconnect
with v1 if they don't. In order to do that, improve the reconnection
behavior such that we will reconnect after a sleep of 500ms
(which usually should be enough for our peer to send us their
version message).1 parent d5e5810 commit 770c031
2 files changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2423 | 2423 | | |
2424 | 2424 | | |
2425 | 2425 | | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
2426 | 2429 | | |
2427 | 2430 | | |
2428 | 2431 | | |
2429 | 2432 | | |
2430 | 2433 | | |
2431 | | - | |
| 2434 | + | |
2432 | 2435 | | |
2433 | 2436 | | |
2434 | 2437 | | |
| |||
2437 | 2440 | | |
2438 | 2441 | | |
2439 | 2442 | | |
| 2443 | + | |
2440 | 2444 | | |
2441 | 2445 | | |
2442 | 2446 | | |
| |||
2846 | 2850 | | |
2847 | 2851 | | |
2848 | 2852 | | |
| 2853 | + | |
| 2854 | + | |
2849 | 2855 | | |
2850 | 2856 | | |
2851 | 2857 | | |
2852 | | - | |
2853 | | - | |
2854 | 2858 | | |
2855 | 2859 | | |
2856 | 2860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1084 | 1084 | | |
1085 | 1085 | | |
1086 | 1086 | | |
1087 | | - | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1088 | 1090 | | |
1089 | | - | |
1090 | | - | |
| 1091 | + | |
1091 | 1092 | | |
1092 | 1093 | | |
1093 | 1094 | | |
| |||
0 commit comments