@@ -61,10 +61,14 @@ func (h *testEthHandler) Handle(peer *eth.Peer, packet eth.Packet) error {
6161 h .blockBroadcasts .Send (packet .Block )
6262 return nil
6363
64- case * eth.NewPooledTransactionHashesPacket :
64+ case * eth.NewPooledTransactionHashesPacket66 :
6565 h .txAnnounces .Send (([]common.Hash )(* packet ))
6666 return nil
6767
68+ case * eth.NewPooledTransactionHashesPacket68 :
69+ h .txAnnounces .Send (packet .Hashes )
70+ return nil
71+
6872 case * eth.TransactionsPacket :
6973 h .txBroadcasts .Send (([]* types.Transaction )(* packet ))
7074 return nil
@@ -81,6 +85,8 @@ func (h *testEthHandler) Handle(peer *eth.Peer, packet eth.Packet) error {
8185// Tests that peers are correctly accepted (or rejected) based on the advertised
8286// fork IDs in the protocol handshake.
8387func TestForkIDSplit66 (t * testing.T ) { testForkIDSplit (t , eth .ETH66 ) }
88+ func TestForkIDSplit67 (t * testing.T ) { testForkIDSplit (t , eth .ETH67 ) }
89+ func TestForkIDSplit68 (t * testing.T ) { testForkIDSplit (t , eth .ETH68 ) }
8490
8591func testForkIDSplit (t * testing.T , protocol uint ) {
8692 t .Parallel ()
@@ -235,6 +241,8 @@ func testForkIDSplit(t *testing.T, protocol uint) {
235241
236242// Tests that received transactions are added to the local pool.
237243func TestRecvTransactions66 (t * testing.T ) { testRecvTransactions (t , eth .ETH66 ) }
244+ func TestRecvTransactions67 (t * testing.T ) { testRecvTransactions (t , eth .ETH67 ) }
245+ func TestRecvTransactions68 (t * testing.T ) { testRecvTransactions (t , eth .ETH68 ) }
238246
239247func testRecvTransactions (t * testing.T , protocol uint ) {
240248 t .Parallel ()
@@ -292,6 +300,8 @@ func testRecvTransactions(t *testing.T, protocol uint) {
292300
293301// This test checks that pending transactions are sent.
294302func TestSendTransactions66 (t * testing.T ) { testSendTransactions (t , eth .ETH66 ) }
303+ func TestSendTransactions67 (t * testing.T ) { testSendTransactions (t , eth .ETH67 ) }
304+ func TestSendTransactions68 (t * testing.T ) { testSendTransactions (t , eth .ETH68 ) }
295305
296306func testSendTransactions (t * testing.T , protocol uint ) {
297307 t .Parallel ()
@@ -350,7 +360,7 @@ func testSendTransactions(t *testing.T, protocol uint) {
350360 seen := make (map [common.Hash ]struct {})
351361 for len (seen ) < len (insert ) {
352362 switch protocol {
353- case 66 :
363+ case 66 , 67 , 68 :
354364 select {
355365 case hashes := <- anns :
356366 for _ , hash := range hashes {
@@ -377,6 +387,8 @@ func testSendTransactions(t *testing.T, protocol uint) {
377387// Tests that transactions get propagated to all attached peers, either via direct
378388// broadcasts or via announcements/retrievals.
379389func TestTransactionPropagation66 (t * testing.T ) { testTransactionPropagation (t , eth .ETH66 ) }
390+ func TestTransactionPropagation67 (t * testing.T ) { testTransactionPropagation (t , eth .ETH67 ) }
391+ func TestTransactionPropagation68 (t * testing.T ) { testTransactionPropagation (t , eth .ETH68 ) }
380392
381393func testTransactionPropagation (t * testing.T , protocol uint ) {
382394 t .Parallel ()
@@ -678,6 +690,8 @@ func testBroadcastBlock(t *testing.T, peers, bcasts int) {
678690// Tests that a propagated malformed block (uncles or transactions don't match
679691// with the hashes in the header) gets discarded and not broadcast forward.
680692func TestBroadcastMalformedBlock66 (t * testing.T ) { testBroadcastMalformedBlock (t , eth .ETH66 ) }
693+ func TestBroadcastMalformedBlock67 (t * testing.T ) { testBroadcastMalformedBlock (t , eth .ETH67 ) }
694+ func TestBroadcastMalformedBlock68 (t * testing.T ) { testBroadcastMalformedBlock (t , eth .ETH68 ) }
681695
682696func testBroadcastMalformedBlock (t * testing.T , protocol uint ) {
683697 t .Parallel ()
0 commit comments