@@ -52,18 +52,18 @@ func TestDialSchedDynDial(t *testing.T) {
5252 {flags : dynDialedConn , node : newNode (uintID (0x02 ), "" )},
5353 },
5454 discovered : []* enode.Node {
55- newNode (uintID (0x00 ), "127.0.0.1:30303 " ), // not dialed because already connected as static peer
56- newNode (uintID (0x02 ), "127.0.0.1:30303 " ), // ...
57- newNode (uintID (0x03 ), "127.0.0.1:30303 " ),
58- newNode (uintID (0x04 ), "127.0.0.1:30303 " ),
59- newNode (uintID (0x05 ), "127.0.0.1:30303 " ), // not dialed because there are only two slots
60- newNode (uintID (0x06 ), "127.0.0.1:30303 " ), // ...
61- newNode (uintID (0x07 ), "127.0.0.1:30303 " ), // ...
62- newNode (uintID (0x08 ), "127.0.0.1:30303 " ), // ...
55+ newNode (uintID (0x00 ), "127.0.0.1:32110 " ), // not dialed because already connected as static peer
56+ newNode (uintID (0x02 ), "127.0.0.1:32110 " ), // ...
57+ newNode (uintID (0x03 ), "127.0.0.1:32110 " ),
58+ newNode (uintID (0x04 ), "127.0.0.1:32110 " ),
59+ newNode (uintID (0x05 ), "127.0.0.1:32110 " ), // not dialed because there are only two slots
60+ newNode (uintID (0x06 ), "127.0.0.1:32110 " ), // ...
61+ newNode (uintID (0x07 ), "127.0.0.1:32110 " ), // ...
62+ newNode (uintID (0x08 ), "127.0.0.1:32110 " ), // ...
6363 },
6464 wantNewDials : []* enode.Node {
65- newNode (uintID (0x03 ), "127.0.0.1:30303 " ),
66- newNode (uintID (0x04 ), "127.0.0.1:30303 " ),
65+ newNode (uintID (0x03 ), "127.0.0.1:32110 " ),
66+ newNode (uintID (0x04 ), "127.0.0.1:32110 " ),
6767 },
6868 },
6969
@@ -73,7 +73,7 @@ func TestDialSchedDynDial(t *testing.T) {
7373 uintID (0x04 ),
7474 },
7575 wantNewDials : []* enode.Node {
76- newNode (uintID (0x05 ), "127.0.0.1:30303 " ),
76+ newNode (uintID (0x05 ), "127.0.0.1:32110 " ),
7777 },
7878 },
7979
@@ -86,7 +86,7 @@ func TestDialSchedDynDial(t *testing.T) {
8686 uintID (0x05 ),
8787 },
8888 discovered : []* enode.Node {
89- newNode (uintID (0x09 ), "127.0.0.1:30303 " ), // not dialed because there are no free slots
89+ newNode (uintID (0x09 ), "127.0.0.1:32110 " ), // not dialed because there are no free slots
9090 },
9191 },
9292
@@ -99,18 +99,18 @@ func TestDialSchedDynDial(t *testing.T) {
9999 uintID (0x02 ),
100100 },
101101 discovered : []* enode.Node {
102- newNode (uintID (0x0a ), "127.0.0.1:30303 " ),
103- newNode (uintID (0x0b ), "127.0.0.1:30303 " ),
104- newNode (uintID (0x0c ), "127.0.0.1:30303 " ),
105- newNode (uintID (0x0d ), "127.0.0.1:30303 " ),
106- newNode (uintID (0x0f ), "127.0.0.1:30303 " ),
102+ newNode (uintID (0x0a ), "127.0.0.1:32110 " ),
103+ newNode (uintID (0x0b ), "127.0.0.1:32110 " ),
104+ newNode (uintID (0x0c ), "127.0.0.1:32110 " ),
105+ newNode (uintID (0x0d ), "127.0.0.1:32110 " ),
106+ newNode (uintID (0x0f ), "127.0.0.1:32110 " ),
107107 },
108108 wantNewDials : []* enode.Node {
109- newNode (uintID (0x06 ), "127.0.0.1:30303 " ),
110- newNode (uintID (0x07 ), "127.0.0.1:30303 " ),
111- newNode (uintID (0x08 ), "127.0.0.1:30303 " ),
112- newNode (uintID (0x09 ), "127.0.0.1:30303 " ),
113- newNode (uintID (0x0a ), "127.0.0.1:30303 " ),
109+ newNode (uintID (0x06 ), "127.0.0.1:32110 " ),
110+ newNode (uintID (0x07 ), "127.0.0.1:32110 " ),
111+ newNode (uintID (0x08 ), "127.0.0.1:32110 " ),
112+ newNode (uintID (0x09 ), "127.0.0.1:32110 " ),
113+ newNode (uintID (0x0a ), "127.0.0.1:32110 " ),
114114 },
115115 },
116116 })
@@ -121,14 +121,14 @@ func TestDialSchedNetRestrict(t *testing.T) {
121121 t .Parallel ()
122122
123123 nodes := []* enode.Node {
124- newNode (uintID (0x01 ), "127.0.0.1:30303 " ),
125- newNode (uintID (0x02 ), "127.0.0.2:30303 " ),
126- newNode (uintID (0x03 ), "127.0.0.3:30303 " ),
127- newNode (uintID (0x04 ), "127.0.0.4:30303 " ),
128- newNode (uintID (0x05 ), "127.0.2.5:30303 " ),
129- newNode (uintID (0x06 ), "127.0.2.6:30303 " ),
130- newNode (uintID (0x07 ), "127.0.2.7:30303 " ),
131- newNode (uintID (0x08 ), "127.0.2.8:30303 " ),
124+ newNode (uintID (0x01 ), "127.0.0.1:32110 " ),
125+ newNode (uintID (0x02 ), "127.0.0.2:32110 " ),
126+ newNode (uintID (0x03 ), "127.0.0.3:32110 " ),
127+ newNode (uintID (0x04 ), "127.0.0.4:32110 " ),
128+ newNode (uintID (0x05 ), "127.0.2.5:32110 " ),
129+ newNode (uintID (0x06 ), "127.0.2.6:32110 " ),
130+ newNode (uintID (0x07 ), "127.0.2.7:32110 " ),
131+ newNode (uintID (0x08 ), "127.0.2.8:32110 " ),
132132 }
133133 config := dialConfig {
134134 netRestrict : new (netutil.Netlist ),
@@ -165,28 +165,28 @@ func TestDialSchedStaticDial(t *testing.T) {
165165 // aren't yet connected.
166166 {
167167 peersAdded : []* conn {
168- {flags : dynDialedConn , node : newNode (uintID (0x01 ), "127.0.0.1:30303 " )},
169- {flags : dynDialedConn , node : newNode (uintID (0x02 ), "127.0.0.2:30303 " )},
168+ {flags : dynDialedConn , node : newNode (uintID (0x01 ), "127.0.0.1:32110 " )},
169+ {flags : dynDialedConn , node : newNode (uintID (0x02 ), "127.0.0.2:32110 " )},
170170 },
171171 update : func (d * dialScheduler ) {
172172 // These two are not dialed because they're already connected
173173 // as dynamic peers.
174- d .addStatic (newNode (uintID (0x01 ), "127.0.0.1:30303 " ))
175- d .addStatic (newNode (uintID (0x02 ), "127.0.0.2:30303 " ))
174+ d .addStatic (newNode (uintID (0x01 ), "127.0.0.1:32110 " ))
175+ d .addStatic (newNode (uintID (0x02 ), "127.0.0.2:32110 " ))
176176 // These nodes will be dialed:
177- d .addStatic (newNode (uintID (0x03 ), "127.0.0.3:30303 " ))
178- d .addStatic (newNode (uintID (0x04 ), "127.0.0.4:30303 " ))
179- d .addStatic (newNode (uintID (0x05 ), "127.0.0.5:30303 " ))
180- d .addStatic (newNode (uintID (0x06 ), "127.0.0.6:30303 " ))
181- d .addStatic (newNode (uintID (0x07 ), "127.0.0.7:30303 " ))
182- d .addStatic (newNode (uintID (0x08 ), "127.0.0.8:30303 " ))
183- d .addStatic (newNode (uintID (0x09 ), "127.0.0.9:30303 " ))
177+ d .addStatic (newNode (uintID (0x03 ), "127.0.0.3:32110 " ))
178+ d .addStatic (newNode (uintID (0x04 ), "127.0.0.4:32110 " ))
179+ d .addStatic (newNode (uintID (0x05 ), "127.0.0.5:32110 " ))
180+ d .addStatic (newNode (uintID (0x06 ), "127.0.0.6:32110 " ))
181+ d .addStatic (newNode (uintID (0x07 ), "127.0.0.7:32110 " ))
182+ d .addStatic (newNode (uintID (0x08 ), "127.0.0.8:32110 " ))
183+ d .addStatic (newNode (uintID (0x09 ), "127.0.0.9:32110 " ))
184184 },
185185 wantNewDials : []* enode.Node {
186- newNode (uintID (0x03 ), "127.0.0.3:30303 " ),
187- newNode (uintID (0x04 ), "127.0.0.4:30303 " ),
188- newNode (uintID (0x05 ), "127.0.0.5:30303 " ),
189- newNode (uintID (0x06 ), "127.0.0.6:30303 " ),
186+ newNode (uintID (0x03 ), "127.0.0.3:32110 " ),
187+ newNode (uintID (0x04 ), "127.0.0.4:32110 " ),
188+ newNode (uintID (0x05 ), "127.0.0.5:32110 " ),
189+ newNode (uintID (0x06 ), "127.0.0.6:32110 " ),
190190 },
191191 },
192192 // Dial to 0x03 completes, filling a peer slot. One slot remains,
@@ -206,21 +206,21 @@ func TestDialSchedStaticDial(t *testing.T) {
206206 uintID (0x06 ): nil ,
207207 },
208208 wantNewDials : []* enode.Node {
209- newNode (uintID (0x08 ), "127.0.0.8:30303 " ),
210- newNode (uintID (0x09 ), "127.0.0.9:30303 " ),
209+ newNode (uintID (0x08 ), "127.0.0.8:32110 " ),
210+ newNode (uintID (0x09 ), "127.0.0.9:32110 " ),
211211 },
212212 },
213213 // Peer 0x01 drops and 0x07 connects as inbound peer.
214214 // Only 0x01 is dialed.
215215 {
216216 peersAdded : []* conn {
217- {flags : inboundConn , node : newNode (uintID (0x07 ), "127.0.0.7:30303 " )},
217+ {flags : inboundConn , node : newNode (uintID (0x07 ), "127.0.0.7:32110 " )},
218218 },
219219 peersRemoved : []enode.ID {
220220 uintID (0x01 ),
221221 },
222222 wantNewDials : []* enode.Node {
223- newNode (uintID (0x01 ), "127.0.0.1:30303 " ),
223+ newNode (uintID (0x01 ), "127.0.0.1:32110 " ),
224224 },
225225 },
226226 })
@@ -238,12 +238,12 @@ func TestDialSchedRemoveStatic(t *testing.T) {
238238 // Add static nodes.
239239 {
240240 update : func (d * dialScheduler ) {
241- d .addStatic (newNode (uintID (0x01 ), "127.0.0.1:30303 " ))
242- d .addStatic (newNode (uintID (0x02 ), "127.0.0.2:30303 " ))
243- d .addStatic (newNode (uintID (0x03 ), "127.0.0.3:30303 " ))
241+ d .addStatic (newNode (uintID (0x01 ), "127.0.0.1:32110 " ))
242+ d .addStatic (newNode (uintID (0x02 ), "127.0.0.2:32110 " ))
243+ d .addStatic (newNode (uintID (0x03 ), "127.0.0.3:32110 " ))
244244 },
245245 wantNewDials : []* enode.Node {
246- newNode (uintID (0x01 ), "127.0.0.1:30303 " ),
246+ newNode (uintID (0x01 ), "127.0.0.1:32110 " ),
247247 },
248248 },
249249 // Dial to 0x01 fails.
@@ -255,16 +255,16 @@ func TestDialSchedRemoveStatic(t *testing.T) {
255255 uintID (0x01 ): nil ,
256256 },
257257 wantNewDials : []* enode.Node {
258- newNode (uintID (0x02 ), "127.0.0.2:30303 " ),
258+ newNode (uintID (0x02 ), "127.0.0.2:32110 " ),
259259 },
260260 },
261261 // All static nodes are removed. 0x01 is in history, 0x02 is being
262262 // dialed, 0x03 is in staticPool.
263263 {
264264 update : func (d * dialScheduler ) {
265- d .removeStatic (newNode (uintID (0x01 ), "127.0.0.1:30303 " ))
266- d .removeStatic (newNode (uintID (0x02 ), "127.0.0.2:30303 " ))
267- d .removeStatic (newNode (uintID (0x03 ), "127.0.0.3:30303 " ))
265+ d .removeStatic (newNode (uintID (0x01 ), "127.0.0.1:32110 " ))
266+ d .removeStatic (newNode (uintID (0x02 ), "127.0.0.2:32110 " ))
267+ d .removeStatic (newNode (uintID (0x03 ), "127.0.0.3:32110 " ))
268268 },
269269 failed : []enode.ID {
270270 uintID (0x02 ),
@@ -274,7 +274,9 @@ func TestDialSchedRemoveStatic(t *testing.T) {
274274 },
275275 },
276276 // Since all static nodes are removed, they should not be dialed again.
277- {}, {}, {},
277+ {},
278+ {},
279+ {},
278280 })
279281}
280282
@@ -291,7 +293,7 @@ func TestDialSchedManyStaticNodes(t *testing.T) {
291293 },
292294 update : func (d * dialScheduler ) {
293295 for id := uint16 (0 ); id < 2000 ; id ++ {
294- n := newNode (uintID (id ), "127.0.0.1:30303 " )
296+ n := newNode (uintID (id ), "127.0.0.1:32110 " )
295297 d .addStatic (n )
296298 }
297299 },
@@ -302,10 +304,10 @@ func TestDialSchedManyStaticNodes(t *testing.T) {
302304 uintID (0xFFFF ),
303305 },
304306 wantNewDials : []* enode.Node {
305- newNode (uintID (0x0085 ), "127.0.0.1:30303 " ),
306- newNode (uintID (0x02dc ), "127.0.0.1:30303 " ),
307- newNode (uintID (0x0285 ), "127.0.0.1:30303 " ),
308- newNode (uintID (0x00cb ), "127.0.0.1:30303 " ),
307+ newNode (uintID (0x0085 ), "127.0.0.1:32110 " ),
308+ newNode (uintID (0x02dc ), "127.0.0.1:32110 " ),
309+ newNode (uintID (0x0285 ), "127.0.0.1:32110 " ),
310+ newNode (uintID (0x00cb ), "127.0.0.1:32110 " ),
309311 },
310312 },
311313 })
@@ -322,14 +324,14 @@ func TestDialSchedHistory(t *testing.T) {
322324 runDialTest (t , config , []dialTestRound {
323325 {
324326 update : func (d * dialScheduler ) {
325- d .addStatic (newNode (uintID (0x01 ), "127.0.0.1:30303 " ))
326- d .addStatic (newNode (uintID (0x02 ), "127.0.0.2:30303 " ))
327- d .addStatic (newNode (uintID (0x03 ), "127.0.0.3:30303 " ))
327+ d .addStatic (newNode (uintID (0x01 ), "127.0.0.1:32110 " ))
328+ d .addStatic (newNode (uintID (0x02 ), "127.0.0.2:32110 " ))
329+ d .addStatic (newNode (uintID (0x03 ), "127.0.0.3:32110 " ))
328330 },
329331 wantNewDials : []* enode.Node {
330- newNode (uintID (0x01 ), "127.0.0.1:30303 " ),
331- newNode (uintID (0x02 ), "127.0.0.2:30303 " ),
332- newNode (uintID (0x03 ), "127.0.0.3:30303 " ),
332+ newNode (uintID (0x01 ), "127.0.0.1:32110 " ),
333+ newNode (uintID (0x02 ), "127.0.0.2:32110 " ),
334+ newNode (uintID (0x03 ), "127.0.0.3:32110 " ),
333335 },
334336 },
335337 // No new tasks are launched in this round because all static
@@ -352,7 +354,7 @@ func TestDialSchedHistory(t *testing.T) {
352354 // The cache entry for node 0x03 has expired and is retried.
353355 {
354356 wantNewDials : []* enode.Node {
355- newNode (uintID (0x03 ), "127.0.0.3:30303 " ),
357+ newNode (uintID (0x03 ), "127.0.0.3:32110 " ),
356358 },
357359 },
358360 })
@@ -366,8 +368,8 @@ func TestDialSchedResolve(t *testing.T) {
366368 maxDialPeers : 1 ,
367369 }
368370 node := newNode (uintID (0x01 ), "" )
369- resolved := newNode (uintID (0x01 ), "127.0.0.1:30303 " )
370- resolved2 := newNode (uintID (0x01 ), "127.0.0.55:30303 " )
371+ resolved := newNode (uintID (0x01 ), "127.0.0.1:32110 " )
372+ resolved2 := newNode (uintID (0x01 ), "127.0.0.55:32110 " )
371373 runDialTest (t , config , []dialTestRound {
372374 {
373375 update : func (d * dialScheduler ) {
0 commit comments