fix: eth/protocol: bunduled transactions are not broadcasted to the peers (#1296)

This commit is contained in:
Pratik Patil 2024-07-29 14:44:48 +05:30 committed by GitHub
parent 577a8a0376
commit d0c74c4cf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -56,6 +56,7 @@ type Transaction struct {
inner TxData // Consensus contents of a transaction inner TxData // Consensus contents of a transaction
time time.Time // Time first seen locally (spam avoidance) time time.Time // Time first seen locally (spam avoidance)
// BOR specific - DO NOT REMOVE
// knownAccounts (EIP-4337) // knownAccounts (EIP-4337)
optionsAA4337 *OptionsAA4337 optionsAA4337 *OptionsAA4337

View file

@ -80,7 +80,11 @@ func (p *Peer) broadcastTransactions() {
size common.StorageSize size common.StorageSize
) )
for i := 0; i < len(queue) && size < maxTxPacketSize; i++ { 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) txs = append(txs, tx)
size += common.StorageSize(tx.Size()) size += common.StorageSize(tx.Size())
} }
@ -151,6 +155,7 @@ func (p *Peer) announceTransactions() {
) )
for count = 0; count < len(queue) && size < maxTxPacketSize; count++ { for count = 0; count < len(queue) && size < maxTxPacketSize; count++ {
tx := p.txpool.Get(queue[count]) tx := p.txpool.Get(queue[count])
// BOR specific - DO NOT REMOVE
// Skip EIP-4337 bundled transactions // Skip EIP-4337 bundled transactions
if tx != nil && tx.GetOptions() == nil { if tx != nil && tx.GetOptions() == nil {
pending = append(pending, queue[count]) pending = append(pending, queue[count])