From d0c74c4cf293a5bdb784362e09afcba00affdf91 Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Mon, 29 Jul 2024 14:44:48 +0530 Subject: [PATCH] fix: eth/protocol: bunduled transactions are not broadcasted to the peers (#1296) --- core/types/transaction.go | 1 + eth/protocols/eth/broadcast.go | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/types/transaction.go b/core/types/transaction.go index 22d969e4cb..da09dcf5a5 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -56,6 +56,7 @@ type Transaction struct { inner TxData // Consensus contents of a transaction time time.Time // Time first seen locally (spam avoidance) + // BOR specific - DO NOT REMOVE // knownAccounts (EIP-4337) optionsAA4337 *OptionsAA4337 diff --git a/eth/protocols/eth/broadcast.go b/eth/protocols/eth/broadcast.go index 646a3c9163..e53854a6f1 100644 --- a/eth/protocols/eth/broadcast.go +++ b/eth/protocols/eth/broadcast.go @@ -80,7 +80,11 @@ func (p *Peer) broadcastTransactions() { size common.StorageSize ) for i := 0; i < len(queue) && size < maxTxPacketSize; i++ { - if tx := p.txpool.Get(queue[i]); tx != nil { + tx := p.txpool.Get(queue[i]) + + // BOR specific - DO NOT REMOVE + // Skip EIP-4337 bundled transactions + if tx != nil && tx.GetOptions() == nil { txs = append(txs, tx) size += common.StorageSize(tx.Size()) } @@ -151,6 +155,7 @@ func (p *Peer) announceTransactions() { ) for count = 0; count < len(queue) && size < maxTxPacketSize; count++ { tx := p.txpool.Get(queue[count]) + // BOR specific - DO NOT REMOVE // Skip EIP-4337 bundled transactions if tx != nil && tx.GetOptions() == nil { pending = append(pending, queue[count])