@@ -80,8 +80,8 @@ func (h *testEthHandler) Handle(peer *eth.Peer, packet eth.Packet) error {
80
80
81
81
// Tests that peers are correctly accepted (or rejected) based on the advertised
82
82
// fork IDs in the protocol handshake.
83
- func TestForkIDSplit64 (t * testing.T ) { testForkIDSplit (t , 64 ) }
84
- func TestForkIDSplit65 (t * testing.T ) { testForkIDSplit (t , 65 ) }
83
+ func TestForkIDSplit65 (t * testing.T ) { testForkIDSplit (t , eth . ETH65 ) }
84
+ func TestForkIDSplit66 (t * testing.T ) { testForkIDSplit (t , eth . ETH66 ) }
85
85
86
86
func testForkIDSplit (t * testing.T , protocol uint ) {
87
87
t .Parallel ()
@@ -236,8 +236,8 @@ func testForkIDSplit(t *testing.T, protocol uint) {
236
236
}
237
237
238
238
// Tests that received transactions are added to the local pool.
239
- func TestRecvTransactions64 (t * testing.T ) { testRecvTransactions (t , 64 ) }
240
- func TestRecvTransactions65 (t * testing.T ) { testRecvTransactions (t , 65 ) }
239
+ func TestRecvTransactions65 (t * testing.T ) { testRecvTransactions (t , eth . ETH65 ) }
240
+ func TestRecvTransactions66 (t * testing.T ) { testRecvTransactions (t , eth . ETH66 ) }
241
241
242
242
func testRecvTransactions (t * testing.T , protocol uint ) {
243
243
t .Parallel ()
@@ -294,8 +294,8 @@ func testRecvTransactions(t *testing.T, protocol uint) {
294
294
}
295
295
296
296
// This test checks that pending transactions are sent.
297
- func TestSendTransactions64 (t * testing.T ) { testSendTransactions (t , 64 ) }
298
- func TestSendTransactions65 (t * testing.T ) { testSendTransactions (t , 65 ) }
297
+ func TestSendTransactions65 (t * testing.T ) { testSendTransactions (t , eth . ETH65 ) }
298
+ func TestSendTransactions66 (t * testing.T ) { testSendTransactions (t , eth . ETH66 ) }
299
299
300
300
func testSendTransactions (t * testing.T , protocol uint ) {
301
301
t .Parallel ()
@@ -354,19 +354,7 @@ func testSendTransactions(t *testing.T, protocol uint) {
354
354
seen := make (map [common.Hash ]struct {})
355
355
for len (seen ) < len (insert ) {
356
356
switch protocol {
357
- case 63 , 64 :
358
- select {
359
- case <- anns :
360
- t .Errorf ("tx announce received on pre eth/65" )
361
- case txs := <- bcasts :
362
- for _ , tx := range txs {
363
- if _ , ok := seen [tx .Hash ()]; ok {
364
- t .Errorf ("duplicate transaction announced: %x" , tx .Hash ())
365
- }
366
- seen [tx .Hash ()] = struct {}{}
367
- }
368
- }
369
- case 65 :
357
+ case 65 , 66 :
370
358
select {
371
359
case hashes := <- anns :
372
360
for _ , hash := range hashes {
@@ -392,8 +380,8 @@ func testSendTransactions(t *testing.T, protocol uint) {
392
380
393
381
// Tests that transactions get propagated to all attached peers, either via direct
394
382
// broadcasts or via announcements/retrievals.
395
- func TestTransactionPropagation64 (t * testing.T ) { testTransactionPropagation (t , 64 ) }
396
- func TestTransactionPropagation65 (t * testing.T ) { testTransactionPropagation (t , 65 ) }
383
+ func TestTransactionPropagation65 (t * testing.T ) { testTransactionPropagation (t , eth . ETH65 ) }
384
+ func TestTransactionPropagation66 (t * testing.T ) { testTransactionPropagation (t , eth . ETH66 ) }
397
385
398
386
func testTransactionPropagation (t * testing.T , protocol uint ) {
399
387
t .Parallel ()
@@ -530,8 +518,8 @@ func testCheckpointChallenge(t *testing.T, syncmode downloader.SyncMode, checkpo
530
518
defer p2pLocal .Close ()
531
519
defer p2pRemote .Close ()
532
520
533
- local := eth .NewPeer (eth .ETH64 , p2p .NewPeer (enode.ID {1 }, "" , nil ), p2pLocal , handler .txpool )
534
- remote := eth .NewPeer (eth .ETH64 , p2p .NewPeer (enode.ID {2 }, "" , nil ), p2pRemote , handler .txpool )
521
+ local := eth .NewPeer (eth .ETH65 , p2p .NewPeer (enode.ID {1 }, "" , nil ), p2pLocal , handler .txpool )
522
+ remote := eth .NewPeer (eth .ETH65 , p2p .NewPeer (enode.ID {2 }, "" , nil ), p2pRemote , handler .txpool )
535
523
defer local .Close ()
536
524
defer remote .Close ()
537
525
@@ -620,8 +608,8 @@ func testBroadcastBlock(t *testing.T, peers, bcasts int) {
620
608
defer sourcePipe .Close ()
621
609
defer sinkPipe .Close ()
622
610
623
- sourcePeer := eth .NewPeer (eth .ETH64 , p2p .NewPeer (enode.ID {byte (i )}, "" , nil ), sourcePipe , nil )
624
- sinkPeer := eth .NewPeer (eth .ETH64 , p2p .NewPeer (enode.ID {0 }, "" , nil ), sinkPipe , nil )
611
+ sourcePeer := eth .NewPeer (eth .ETH65 , p2p .NewPeer (enode.ID {byte (i )}, "" , nil ), sourcePipe , nil )
612
+ sinkPeer := eth .NewPeer (eth .ETH65 , p2p .NewPeer (enode.ID {0 }, "" , nil ), sinkPipe , nil )
625
613
defer sourcePeer .Close ()
626
614
defer sinkPeer .Close ()
627
615
@@ -672,8 +660,8 @@ func testBroadcastBlock(t *testing.T, peers, bcasts int) {
672
660
673
661
// Tests that a propagated malformed block (uncles or transactions don't match
674
662
// with the hashes in the header) gets discarded and not broadcast forward.
675
- func TestBroadcastMalformedBlock64 (t * testing.T ) { testBroadcastMalformedBlock (t , 64 ) }
676
- func TestBroadcastMalformedBlock65 (t * testing.T ) { testBroadcastMalformedBlock (t , 65 ) }
663
+ func TestBroadcastMalformedBlock65 (t * testing.T ) { testBroadcastMalformedBlock (t , eth . ETH65 ) }
664
+ func TestBroadcastMalformedBlock66 (t * testing.T ) { testBroadcastMalformedBlock (t , eth . ETH66 ) }
677
665
678
666
func testBroadcastMalformedBlock (t * testing.T , protocol uint ) {
679
667
t .Parallel ()
0 commit comments