Skip to content

Commit b89baa7

Browse files
committed
eth, eth/protocols/eth: transaction announcements for ETH66 only as the previous metadium protocol version was ETH65
1 parent a992c50 commit b89baa7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

eth/protocols/eth/peer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func NewPeer(version uint, p *p2p.Peer, rw p2p.MsgReadWriter, txpool TxPool) *Pe
109109
// Start up all the broadcasters
110110
go peer.broadcastBlocks()
111111
go peer.broadcastTransactions()
112-
if version >= ETH65 {
112+
if version >= ETH66 {
113113
go peer.announceTransactions()
114114
}
115115
return peer

eth/sync.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (h *handler) syncTransactions(p *eth.Peer) {
6666
// The eth/65 protocol introduces proper transaction announcements, so instead
6767
// of dripping transactions across multiple peers, just send the entire list as
6868
// an announcement and let the remote side decide what they need (likely nothing).
69-
if p.Version() >= eth.ETH65 {
69+
if p.Version() > eth.ETH65 {
7070
hashes := make([]common.Hash, len(txs))
7171
for i, tx := range txs {
7272
hashes[i] = tx.Hash()
@@ -97,7 +97,7 @@ func (h *handler) txsyncLoop64() {
9797

9898
// send starts a sending a pack of transactions from the sync.
9999
send := func(s *txsync) {
100-
if s.p.Version() >= eth.ETH65 {
100+
if s.p.Version() > eth.ETH65 {
101101
panic("initial transaction syncer running on eth/65+")
102102
}
103103
// Fill pack with transactions up to the target size.

0 commit comments

Comments
 (0)