Commit b108a1c
committed
Add default bootstrap peers and connection fixes
Introduce default libp2p bootstrap peers and a new BootstrapPeers config field, applied in NewConfig and init to ensure gomobile-created Configs get sensible defaults. Reduce autorelay boot delay from 30s to 15s. Spawn a background goroutine to connect to bootstrap peers (with a 15s timeout per peer) to improve DHT/identify/hole-punching startup behavior, ignoring malformed addresses. When using a direct BloxAddr, also add relay /p2p-circuit addresses to the peerstore as a fallback so libp2p can try relays if direct connections fail. Also add strings import required for the new fallback logic.1 parent 872745c commit b108a1c
File tree
5 files changed
+619
-710
lines changed- cmd/blox
- mobile
- wap/pkg/wifi
5 files changed
+619
-710
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
882 | 881 | | |
883 | 882 | | |
884 | 883 | | |
885 | | - | |
| 884 | + | |
886 | 885 | | |
887 | | - | |
| 886 | + | |
888 | 887 | | |
889 | 888 | | |
890 | 889 | | |
| |||
1235 | 1234 | | |
1236 | 1235 | | |
1237 | 1236 | | |
1238 | | - | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1239 | 1240 | | |
1240 | 1241 | | |
1241 | 1242 | | |
| |||
1264 | 1265 | | |
1265 | 1266 | | |
1266 | 1267 | | |
1267 | | - | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
1268 | 1271 | | |
1269 | 1272 | | |
1270 | 1273 | | |
| |||
0 commit comments