File tree 2 files changed +24
-4
lines changed
2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -260,10 +260,10 @@ public Context ReceiveHelloNoEth()
260
260
return this ;
261
261
}
262
262
263
- public Context ReceiveHelloWrongEth ( )
263
+ public Context ReceiveHelloEth ( int protocolVersion )
264
264
{
265
265
HelloMessage msg = new HelloMessage ( ) ;
266
- msg . Capabilities = new List < Capability > { new Capability ( "eth" , 61 ) } ;
266
+ msg . Capabilities = new List < Capability > { new Capability ( "eth" , protocolVersion ) } ;
267
267
msg . NodeId = TestItem . PublicKeyB ;
268
268
msg . ClientId = "other client v1" ;
269
269
msg . P2PVersion = 5 ;
@@ -272,6 +272,12 @@ public Context ReceiveHelloWrongEth()
272
272
return this ;
273
273
}
274
274
275
+
276
+ public Context ReceiveHelloWrongEth ( )
277
+ {
278
+ return ReceiveHelloEth ( 61 ) ;
279
+ }
280
+
275
281
public Context ReceiveStatusWrongChain ( )
276
282
{
277
283
StatusMessage msg = new StatusMessage ( ) ;
@@ -450,7 +456,7 @@ public void Disconnects_on_wrong_eth()
450
456
. ReceiveHelloWrongEth ( )
451
457
. VerifyDisconnected ( ) ;
452
458
}
453
-
459
+
454
460
[ Test ]
455
461
public void Disconnects_on_wrong_chain_id ( )
456
462
{
@@ -478,5 +484,18 @@ public void Disconnects_on_wrong_genesis_hash()
478
484
. ReceiveStatusWrongGenesis ( )
479
485
. VerifyDisconnected ( ) ;
480
486
}
487
+
488
+ [ Test ]
489
+ public void Initialized_with_eth66_only ( )
490
+ {
491
+ When
492
+ . CreateIncomingSession ( )
493
+ . ActivateChannel ( )
494
+ . Handshake ( )
495
+ . Init ( )
496
+ . VerifyInitialized ( )
497
+ . ReceiveHelloEth ( 66 )
498
+ . VerifyInitialized ( ) ;
499
+ }
481
500
}
482
501
}
Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ private bool ValidateCapabilities(IEnumerable<Capability> capabilities)
112
112
x . Version == 62 ||
113
113
x . Version == 63 ||
114
114
x . Version == 64 ||
115
- x . Version == 65 ) ) ;
115
+ x . Version == 65 ||
116
+ x . Version == 66 ) ) ;
116
117
}
117
118
118
119
private bool ValidateChainId ( ulong chainId )
You can’t perform that action at this time.
0 commit comments