@@ -80,8 +80,8 @@ func (h *testEthHandler) Handle(peer *eth.Peer, packet eth.Packet) error {
8080
8181// Tests that peers are correctly accepted (or rejected) based on the advertised
8282// 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 ) }
8585
8686func testForkIDSplit (t * testing.T , protocol uint ) {
8787 t .Parallel ()
@@ -236,8 +236,8 @@ func testForkIDSplit(t *testing.T, protocol uint) {
236236}
237237
238238// 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 ) }
241241
242242func testRecvTransactions (t * testing.T , protocol uint ) {
243243 t .Parallel ()
@@ -294,8 +294,8 @@ func testRecvTransactions(t *testing.T, protocol uint) {
294294}
295295
296296// 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 ) }
299299
300300func testSendTransactions (t * testing.T , protocol uint ) {
301301 t .Parallel ()
@@ -354,19 +354,7 @@ func testSendTransactions(t *testing.T, protocol uint) {
354354 seen := make (map [common.Hash ]struct {})
355355 for len (seen ) < len (insert ) {
356356 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 :
370358 select {
371359 case hashes := <- anns :
372360 for _ , hash := range hashes {
@@ -392,8 +380,8 @@ func testSendTransactions(t *testing.T, protocol uint) {
392380
393381// Tests that transactions get propagated to all attached peers, either via direct
394382// 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 ) }
397385
398386func testTransactionPropagation (t * testing.T , protocol uint ) {
399387 t .Parallel ()
@@ -530,8 +518,8 @@ func testCheckpointChallenge(t *testing.T, syncmode downloader.SyncMode, checkpo
530518 defer p2pLocal .Close ()
531519 defer p2pRemote .Close ()
532520
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 )
535523 defer local .Close ()
536524 defer remote .Close ()
537525
@@ -620,8 +608,8 @@ func testBroadcastBlock(t *testing.T, peers, bcasts int) {
620608 defer sourcePipe .Close ()
621609 defer sinkPipe .Close ()
622610
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 )
625613 defer sourcePeer .Close ()
626614 defer sinkPeer .Close ()
627615
@@ -672,8 +660,8 @@ func testBroadcastBlock(t *testing.T, peers, bcasts int) {
672660
673661// Tests that a propagated malformed block (uncles or transactions don't match
674662// 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 ) }
677665
678666func testBroadcastMalformedBlock (t * testing.T , protocol uint ) {
679667 t .Parallel ()
0 commit comments