Skip to content

Commit 8a76a81

Browse files
authored
cmd/devp2p, eth: drop support for eth/67 (ethereum#28956)
1 parent ae3b7a0 commit 8a76a81

15 files changed

+33
-179
lines changed

Diff for: cmd/devp2p/internal/ethtest/conn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func (c *Conn) ReadEth() (any, error) {
166166
case eth.TransactionsMsg:
167167
msg = new(eth.TransactionsPacket)
168168
case eth.NewPooledTransactionHashesMsg:
169-
msg = new(eth.NewPooledTransactionHashesPacket68)
169+
msg = new(eth.NewPooledTransactionHashesPacket)
170170
case eth.GetPooledTransactionsMsg:
171171
msg = new(eth.GetPooledTransactionsPacket)
172172
case eth.PooledTransactionsMsg:

Diff for: cmd/devp2p/internal/ethtest/suite.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ func (s *Suite) TestNewPooledTxs(t *utesting.T) {
710710
}
711711

712712
// Send announcement.
713-
ann := eth.NewPooledTransactionHashesPacket68{Types: txTypes, Sizes: sizes, Hashes: hashes}
713+
ann := eth.NewPooledTransactionHashesPacket{Types: txTypes, Sizes: sizes, Hashes: hashes}
714714
err = conn.Write(ethProto, eth.NewPooledTransactionHashesMsg, ann)
715715
if err != nil {
716716
t.Fatalf("failed to write to connection: %v", err)
@@ -728,7 +728,7 @@ func (s *Suite) TestNewPooledTxs(t *utesting.T) {
728728
t.Fatalf("unexpected number of txs requested: wanted %d, got %d", len(hashes), len(msg.GetPooledTransactionsRequest))
729729
}
730730
return
731-
case *eth.NewPooledTransactionHashesPacket68:
731+
case *eth.NewPooledTransactionHashesPacket:
732732
continue
733733
case *eth.TransactionsPacket:
734734
continue
@@ -796,12 +796,12 @@ func (s *Suite) TestBlobViolations(t *utesting.T) {
796796
t2 = s.makeBlobTxs(2, 3, 0x2)
797797
)
798798
for _, test := range []struct {
799-
ann eth.NewPooledTransactionHashesPacket68
799+
ann eth.NewPooledTransactionHashesPacket
800800
resp eth.PooledTransactionsResponse
801801
}{
802802
// Invalid tx size.
803803
{
804-
ann: eth.NewPooledTransactionHashesPacket68{
804+
ann: eth.NewPooledTransactionHashesPacket{
805805
Types: []byte{types.BlobTxType, types.BlobTxType},
806806
Sizes: []uint32{uint32(t1[0].Size()), uint32(t1[1].Size() + 10)},
807807
Hashes: []common.Hash{t1[0].Hash(), t1[1].Hash()},
@@ -810,7 +810,7 @@ func (s *Suite) TestBlobViolations(t *utesting.T) {
810810
},
811811
// Wrong tx type.
812812
{
813-
ann: eth.NewPooledTransactionHashesPacket68{
813+
ann: eth.NewPooledTransactionHashesPacket{
814814
Types: []byte{types.DynamicFeeTxType, types.BlobTxType},
815815
Sizes: []uint32{uint32(t2[0].Size()), uint32(t2[1].Size())},
816816
Hashes: []common.Hash{t2[0].Hash(), t2[1].Hash()},

Diff for: cmd/devp2p/internal/ethtest/transaction.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (s *Suite) sendTxs(txs []*types.Transaction) error {
7070
for _, tx := range *msg {
7171
got[tx.Hash()] = true
7272
}
73-
case *eth.NewPooledTransactionHashesPacket68:
73+
case *eth.NewPooledTransactionHashesPacket:
7474
for _, hash := range msg.Hashes {
7575
got[hash] = true
7676
}
@@ -146,7 +146,7 @@ func (s *Suite) sendInvalidTxs(txs []*types.Transaction) error {
146146
return fmt.Errorf("received bad tx: %s", tx.Hash())
147147
}
148148
}
149-
case *eth.NewPooledTransactionHashesPacket68:
149+
case *eth.NewPooledTransactionHashesPacket:
150150
for _, hash := range msg.Hashes {
151151
if _, ok := invalids[hash]; ok {
152152
return fmt.Errorf("received bad tx: %s", hash)

Diff for: eth/downloader/downloader_test.go

+1-67
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,6 @@ func assertOwnChain(t *testing.T, tester *downloadTester, length int) {
440440
func TestCanonicalSynchronisation68Full(t *testing.T) { testCanonSync(t, eth.ETH68, FullSync) }
441441
func TestCanonicalSynchronisation68Snap(t *testing.T) { testCanonSync(t, eth.ETH68, SnapSync) }
442442
func TestCanonicalSynchronisation68Light(t *testing.T) { testCanonSync(t, eth.ETH68, LightSync) }
443-
func TestCanonicalSynchronisation67Full(t *testing.T) { testCanonSync(t, eth.ETH67, FullSync) }
444-
func TestCanonicalSynchronisation67Snap(t *testing.T) { testCanonSync(t, eth.ETH67, SnapSync) }
445-
func TestCanonicalSynchronisation67Light(t *testing.T) { testCanonSync(t, eth.ETH67, LightSync) }
446443

447444
func testCanonSync(t *testing.T, protocol uint, mode SyncMode) {
448445
tester := newTester(t)
@@ -463,8 +460,6 @@ func testCanonSync(t *testing.T, protocol uint, mode SyncMode) {
463460
// until the cached blocks are retrieved.
464461
func TestThrottling68Full(t *testing.T) { testThrottling(t, eth.ETH68, FullSync) }
465462
func TestThrottling68Snap(t *testing.T) { testThrottling(t, eth.ETH68, SnapSync) }
466-
func TestThrottling67Full(t *testing.T) { testThrottling(t, eth.ETH67, FullSync) }
467-
func TestThrottling67Snap(t *testing.T) { testThrottling(t, eth.ETH67, SnapSync) }
468463

469464
func testThrottling(t *testing.T, protocol uint, mode SyncMode) {
470465
tester := newTester(t)
@@ -546,9 +541,6 @@ func testThrottling(t *testing.T, protocol uint, mode SyncMode) {
546541
func TestForkedSync68Full(t *testing.T) { testForkedSync(t, eth.ETH68, FullSync) }
547542
func TestForkedSync68Snap(t *testing.T) { testForkedSync(t, eth.ETH68, SnapSync) }
548543
func TestForkedSync68Light(t *testing.T) { testForkedSync(t, eth.ETH68, LightSync) }
549-
func TestForkedSync67Full(t *testing.T) { testForkedSync(t, eth.ETH67, FullSync) }
550-
func TestForkedSync67Snap(t *testing.T) { testForkedSync(t, eth.ETH67, SnapSync) }
551-
func TestForkedSync67Light(t *testing.T) { testForkedSync(t, eth.ETH67, LightSync) }
552544

553545
func testForkedSync(t *testing.T, protocol uint, mode SyncMode) {
554546
tester := newTester(t)
@@ -576,9 +568,6 @@ func testForkedSync(t *testing.T, protocol uint, mode SyncMode) {
576568
func TestHeavyForkedSync68Full(t *testing.T) { testHeavyForkedSync(t, eth.ETH68, FullSync) }
577569
func TestHeavyForkedSync68Snap(t *testing.T) { testHeavyForkedSync(t, eth.ETH68, SnapSync) }
578570
func TestHeavyForkedSync68Light(t *testing.T) { testHeavyForkedSync(t, eth.ETH68, LightSync) }
579-
func TestHeavyForkedSync67Full(t *testing.T) { testHeavyForkedSync(t, eth.ETH67, FullSync) }
580-
func TestHeavyForkedSync67Snap(t *testing.T) { testHeavyForkedSync(t, eth.ETH67, SnapSync) }
581-
func TestHeavyForkedSync67Light(t *testing.T) { testHeavyForkedSync(t, eth.ETH67, LightSync) }
582571

583572
func testHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
584573
tester := newTester(t)
@@ -608,9 +597,6 @@ func testHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
608597
func TestBoundedForkedSync68Full(t *testing.T) { testBoundedForkedSync(t, eth.ETH68, FullSync) }
609598
func TestBoundedForkedSync68Snap(t *testing.T) { testBoundedForkedSync(t, eth.ETH68, SnapSync) }
610599
func TestBoundedForkedSync68Light(t *testing.T) { testBoundedForkedSync(t, eth.ETH68, LightSync) }
611-
func TestBoundedForkedSync67Full(t *testing.T) { testBoundedForkedSync(t, eth.ETH67, FullSync) }
612-
func TestBoundedForkedSync67Snap(t *testing.T) { testBoundedForkedSync(t, eth.ETH67, SnapSync) }
613-
func TestBoundedForkedSync67Light(t *testing.T) { testBoundedForkedSync(t, eth.ETH67, LightSync) }
614600

615601
func testBoundedForkedSync(t *testing.T, protocol uint, mode SyncMode) {
616602
tester := newTester(t)
@@ -645,15 +631,6 @@ func TestBoundedHeavyForkedSync68Snap(t *testing.T) {
645631
func TestBoundedHeavyForkedSync68Light(t *testing.T) {
646632
testBoundedHeavyForkedSync(t, eth.ETH68, LightSync)
647633
}
648-
func TestBoundedHeavyForkedSync67Full(t *testing.T) {
649-
testBoundedHeavyForkedSync(t, eth.ETH67, FullSync)
650-
}
651-
func TestBoundedHeavyForkedSync67Snap(t *testing.T) {
652-
testBoundedHeavyForkedSync(t, eth.ETH67, SnapSync)
653-
}
654-
func TestBoundedHeavyForkedSync67Light(t *testing.T) {
655-
testBoundedHeavyForkedSync(t, eth.ETH67, LightSync)
656-
}
657634

658635
func testBoundedHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
659636
tester := newTester(t)
@@ -681,9 +658,6 @@ func testBoundedHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
681658
func TestCancel68Full(t *testing.T) { testCancel(t, eth.ETH68, FullSync) }
682659
func TestCancel68Snap(t *testing.T) { testCancel(t, eth.ETH68, SnapSync) }
683660
func TestCancel68Light(t *testing.T) { testCancel(t, eth.ETH68, LightSync) }
684-
func TestCancel67Full(t *testing.T) { testCancel(t, eth.ETH67, FullSync) }
685-
func TestCancel67Snap(t *testing.T) { testCancel(t, eth.ETH67, SnapSync) }
686-
func TestCancel67Light(t *testing.T) { testCancel(t, eth.ETH67, LightSync) }
687661

688662
func testCancel(t *testing.T, protocol uint, mode SyncMode) {
689663
tester := newTester(t)
@@ -711,9 +685,6 @@ func testCancel(t *testing.T, protocol uint, mode SyncMode) {
711685
func TestMultiSynchronisation68Full(t *testing.T) { testMultiSynchronisation(t, eth.ETH68, FullSync) }
712686
func TestMultiSynchronisation68Snap(t *testing.T) { testMultiSynchronisation(t, eth.ETH68, SnapSync) }
713687
func TestMultiSynchronisation68Light(t *testing.T) { testMultiSynchronisation(t, eth.ETH68, LightSync) }
714-
func TestMultiSynchronisation67Full(t *testing.T) { testMultiSynchronisation(t, eth.ETH67, FullSync) }
715-
func TestMultiSynchronisation67Snap(t *testing.T) { testMultiSynchronisation(t, eth.ETH67, SnapSync) }
716-
func TestMultiSynchronisation67Light(t *testing.T) { testMultiSynchronisation(t, eth.ETH67, LightSync) }
717688

718689
func testMultiSynchronisation(t *testing.T, protocol uint, mode SyncMode) {
719690
tester := newTester(t)
@@ -738,9 +709,6 @@ func testMultiSynchronisation(t *testing.T, protocol uint, mode SyncMode) {
738709
func TestMultiProtoSynchronisation68Full(t *testing.T) { testMultiProtoSync(t, eth.ETH68, FullSync) }
739710
func TestMultiProtoSynchronisation68Snap(t *testing.T) { testMultiProtoSync(t, eth.ETH68, SnapSync) }
740711
func TestMultiProtoSynchronisation68Light(t *testing.T) { testMultiProtoSync(t, eth.ETH68, LightSync) }
741-
func TestMultiProtoSynchronisation67Full(t *testing.T) { testMultiProtoSync(t, eth.ETH67, FullSync) }
742-
func TestMultiProtoSynchronisation67Snap(t *testing.T) { testMultiProtoSync(t, eth.ETH67, SnapSync) }
743-
func TestMultiProtoSynchronisation67Light(t *testing.T) { testMultiProtoSync(t, eth.ETH67, LightSync) }
744712

745713
func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
746714
tester := newTester(t)
@@ -751,7 +719,6 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
751719

752720
// Create peers of every type
753721
tester.newPeer("peer 68", eth.ETH68, chain.blocks[1:])
754-
tester.newPeer("peer 67", eth.ETH67, chain.blocks[1:])
755722

756723
// Synchronise with the requested peer and make sure all blocks were retrieved
757724
if err := tester.sync(fmt.Sprintf("peer %d", protocol), nil, mode); err != nil {
@@ -760,7 +727,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
760727
assertOwnChain(t, tester, len(chain.blocks))
761728

762729
// Check that no peers have been dropped off
763-
for _, version := range []int{68, 67} {
730+
for _, version := range []int{68} {
764731
peer := fmt.Sprintf("peer %d", version)
765732
if _, ok := tester.peers[peer]; !ok {
766733
t.Errorf("%s dropped", peer)
@@ -773,9 +740,6 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
773740
func TestEmptyShortCircuit68Full(t *testing.T) { testEmptyShortCircuit(t, eth.ETH68, FullSync) }
774741
func TestEmptyShortCircuit68Snap(t *testing.T) { testEmptyShortCircuit(t, eth.ETH68, SnapSync) }
775742
func TestEmptyShortCircuit68Light(t *testing.T) { testEmptyShortCircuit(t, eth.ETH68, LightSync) }
776-
func TestEmptyShortCircuit67Full(t *testing.T) { testEmptyShortCircuit(t, eth.ETH67, FullSync) }
777-
func TestEmptyShortCircuit67Snap(t *testing.T) { testEmptyShortCircuit(t, eth.ETH67, SnapSync) }
778-
func TestEmptyShortCircuit67Light(t *testing.T) { testEmptyShortCircuit(t, eth.ETH67, LightSync) }
779743

780744
func testEmptyShortCircuit(t *testing.T, protocol uint, mode SyncMode) {
781745
tester := newTester(t)
@@ -824,9 +788,6 @@ func testEmptyShortCircuit(t *testing.T, protocol uint, mode SyncMode) {
824788
func TestMissingHeaderAttack68Full(t *testing.T) { testMissingHeaderAttack(t, eth.ETH68, FullSync) }
825789
func TestMissingHeaderAttack68Snap(t *testing.T) { testMissingHeaderAttack(t, eth.ETH68, SnapSync) }
826790
func TestMissingHeaderAttack68Light(t *testing.T) { testMissingHeaderAttack(t, eth.ETH68, LightSync) }
827-
func TestMissingHeaderAttack67Full(t *testing.T) { testMissingHeaderAttack(t, eth.ETH67, FullSync) }
828-
func TestMissingHeaderAttack67Snap(t *testing.T) { testMissingHeaderAttack(t, eth.ETH67, SnapSync) }
829-
func TestMissingHeaderAttack67Light(t *testing.T) { testMissingHeaderAttack(t, eth.ETH67, LightSync) }
830791

831792
func testMissingHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
832793
tester := newTester(t)
@@ -853,9 +814,6 @@ func testMissingHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
853814
func TestShiftedHeaderAttack68Full(t *testing.T) { testShiftedHeaderAttack(t, eth.ETH68, FullSync) }
854815
func TestShiftedHeaderAttack68Snap(t *testing.T) { testShiftedHeaderAttack(t, eth.ETH68, SnapSync) }
855816
func TestShiftedHeaderAttack68Light(t *testing.T) { testShiftedHeaderAttack(t, eth.ETH68, LightSync) }
856-
func TestShiftedHeaderAttack67Full(t *testing.T) { testShiftedHeaderAttack(t, eth.ETH67, FullSync) }
857-
func TestShiftedHeaderAttack67Snap(t *testing.T) { testShiftedHeaderAttack(t, eth.ETH67, SnapSync) }
858-
func TestShiftedHeaderAttack67Light(t *testing.T) { testShiftedHeaderAttack(t, eth.ETH67, LightSync) }
859817

860818
func testShiftedHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
861819
tester := newTester(t)
@@ -889,15 +847,6 @@ func TestHighTDStarvationAttack68Snap(t *testing.T) {
889847
func TestHighTDStarvationAttack68Light(t *testing.T) {
890848
testHighTDStarvationAttack(t, eth.ETH68, LightSync)
891849
}
892-
func TestHighTDStarvationAttack67Full(t *testing.T) {
893-
testHighTDStarvationAttack(t, eth.ETH67, FullSync)
894-
}
895-
func TestHighTDStarvationAttack67Snap(t *testing.T) {
896-
testHighTDStarvationAttack(t, eth.ETH67, SnapSync)
897-
}
898-
func TestHighTDStarvationAttack67Light(t *testing.T) {
899-
testHighTDStarvationAttack(t, eth.ETH67, LightSync)
900-
}
901850

902851
func testHighTDStarvationAttack(t *testing.T, protocol uint, mode SyncMode) {
903852
tester := newTester(t)
@@ -912,7 +861,6 @@ func testHighTDStarvationAttack(t *testing.T, protocol uint, mode SyncMode) {
912861

913862
// Tests that misbehaving peers are disconnected, whilst behaving ones are not.
914863
func TestBlockHeaderAttackerDropping68(t *testing.T) { testBlockHeaderAttackerDropping(t, eth.ETH68) }
915-
func TestBlockHeaderAttackerDropping67(t *testing.T) { testBlockHeaderAttackerDropping(t, eth.ETH67) }
916864

917865
func testBlockHeaderAttackerDropping(t *testing.T, protocol uint) {
918866
// Define the disconnection requirement for individual hash fetch errors
@@ -963,9 +911,6 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol uint) {
963911
func TestSyncProgress68Full(t *testing.T) { testSyncProgress(t, eth.ETH68, FullSync) }
964912
func TestSyncProgress68Snap(t *testing.T) { testSyncProgress(t, eth.ETH68, SnapSync) }
965913
func TestSyncProgress68Light(t *testing.T) { testSyncProgress(t, eth.ETH68, LightSync) }
966-
func TestSyncProgress67Full(t *testing.T) { testSyncProgress(t, eth.ETH67, FullSync) }
967-
func TestSyncProgress67Snap(t *testing.T) { testSyncProgress(t, eth.ETH67, SnapSync) }
968-
func TestSyncProgress67Light(t *testing.T) { testSyncProgress(t, eth.ETH67, LightSync) }
969914

970915
func testSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
971916
tester := newTester(t)
@@ -1043,9 +988,6 @@ func checkProgress(t *testing.T, d *Downloader, stage string, want ethereum.Sync
1043988
func TestForkedSyncProgress68Full(t *testing.T) { testForkedSyncProgress(t, eth.ETH68, FullSync) }
1044989
func TestForkedSyncProgress68Snap(t *testing.T) { testForkedSyncProgress(t, eth.ETH68, SnapSync) }
1045990
func TestForkedSyncProgress68Light(t *testing.T) { testForkedSyncProgress(t, eth.ETH68, LightSync) }
1046-
func TestForkedSyncProgress67Full(t *testing.T) { testForkedSyncProgress(t, eth.ETH67, FullSync) }
1047-
func TestForkedSyncProgress67Snap(t *testing.T) { testForkedSyncProgress(t, eth.ETH67, SnapSync) }
1048-
func TestForkedSyncProgress67Light(t *testing.T) { testForkedSyncProgress(t, eth.ETH67, LightSync) }
1049991

1050992
func testForkedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
1051993
tester := newTester(t)
@@ -1117,9 +1059,6 @@ func testForkedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
11171059
func TestFailedSyncProgress68Full(t *testing.T) { testFailedSyncProgress(t, eth.ETH68, FullSync) }
11181060
func TestFailedSyncProgress68Snap(t *testing.T) { testFailedSyncProgress(t, eth.ETH68, SnapSync) }
11191061
func TestFailedSyncProgress68Light(t *testing.T) { testFailedSyncProgress(t, eth.ETH68, LightSync) }
1120-
func TestFailedSyncProgress67Full(t *testing.T) { testFailedSyncProgress(t, eth.ETH67, FullSync) }
1121-
func TestFailedSyncProgress67Snap(t *testing.T) { testFailedSyncProgress(t, eth.ETH67, SnapSync) }
1122-
func TestFailedSyncProgress67Light(t *testing.T) { testFailedSyncProgress(t, eth.ETH67, LightSync) }
11231062

11241063
func testFailedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
11251064
tester := newTester(t)
@@ -1186,9 +1125,6 @@ func testFailedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
11861125
func TestFakedSyncProgress68Full(t *testing.T) { testFakedSyncProgress(t, eth.ETH68, FullSync) }
11871126
func TestFakedSyncProgress68Snap(t *testing.T) { testFakedSyncProgress(t, eth.ETH68, SnapSync) }
11881127
func TestFakedSyncProgress68Light(t *testing.T) { testFakedSyncProgress(t, eth.ETH68, LightSync) }
1189-
func TestFakedSyncProgress67Full(t *testing.T) { testFakedSyncProgress(t, eth.ETH67, FullSync) }
1190-
func TestFakedSyncProgress67Snap(t *testing.T) { testFakedSyncProgress(t, eth.ETH67, SnapSync) }
1191-
func TestFakedSyncProgress67Light(t *testing.T) { testFakedSyncProgress(t, eth.ETH67, LightSync) }
11921128

11931129
func testFakedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
11941130
tester := newTester(t)
@@ -1332,8 +1268,6 @@ func TestRemoteHeaderRequestSpan(t *testing.T) {
13321268
// being fast-synced from, avoiding potential cheap eclipse attacks.
13331269
func TestBeaconSync68Full(t *testing.T) { testBeaconSync(t, eth.ETH68, FullSync) }
13341270
func TestBeaconSync68Snap(t *testing.T) { testBeaconSync(t, eth.ETH68, SnapSync) }
1335-
func TestBeaconSync67Full(t *testing.T) { testBeaconSync(t, eth.ETH67, FullSync) }
1336-
func TestBeaconSync67Snap(t *testing.T) { testBeaconSync(t, eth.ETH67, SnapSync) }
13371271

13381272
func testBeaconSync(t *testing.T, protocol uint, mode SyncMode) {
13391273
//log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat(true))))

Diff for: eth/downloader/skeleton_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ func TestSkeletonSyncRetrievals(t *testing.T) {
811811
// Create a peer set to feed headers through
812812
peerset := newPeerSet()
813813
for _, peer := range tt.peers {
814-
peerset.Register(newPeerConnection(peer.id, eth.ETH67, peer, log.New("id", peer.id)))
814+
peerset.Register(newPeerConnection(peer.id, eth.ETH68, peer, log.New("id", peer.id)))
815815
}
816816
// Create a peer dropper to track malicious peers
817817
dropped := make(map[string]int)
@@ -913,7 +913,7 @@ func TestSkeletonSyncRetrievals(t *testing.T) {
913913
skeleton.Sync(tt.newHead, nil, true)
914914
}
915915
if tt.newPeer != nil {
916-
if err := peerset.Register(newPeerConnection(tt.newPeer.id, eth.ETH67, tt.newPeer, log.New("id", tt.newPeer.id))); err != nil {
916+
if err := peerset.Register(newPeerConnection(tt.newPeer.id, eth.ETH68, tt.newPeer, log.New("id", tt.newPeer.id))); err != nil {
917917
t.Errorf("test %d: failed to register new peer: %v", i, err)
918918
}
919919
}

Diff for: eth/handler_eth.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ func (h *ethHandler) Handle(peer *eth.Peer, packet eth.Packet) error {
6767
case *eth.NewBlockPacket:
6868
return h.handleBlockBroadcast(peer, packet.Block, packet.TD)
6969

70-
case *eth.NewPooledTransactionHashesPacket67:
71-
return h.txFetcher.Notify(peer.ID(), nil, nil, *packet)
72-
73-
case *eth.NewPooledTransactionHashesPacket68:
70+
case *eth.NewPooledTransactionHashesPacket:
7471
return h.txFetcher.Notify(peer.ID(), packet.Types, packet.Sizes, packet.Hashes)
7572

7673
case *eth.TransactionsPacket:

0 commit comments

Comments
 (0)