From 5da138570ec9e9133cae54df512bfaa7e2b34639 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 18 Apr 2024 13:44:54 +0800 Subject: [PATCH] fix(proposer): fix an issue in `ProposeOp` (#728) --- proposer/proposer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposer/proposer.go b/proposer/proposer.go index 46c7ac5e0..04da37bd8 100644 --- a/proposer/proposer.go +++ b/proposer/proposer.go @@ -278,7 +278,7 @@ func (p *Proposer) ProposeOp(ctx context.Context) error { // Check if it's time to propose unfiltered pool content. var ( filterPoolContent = time.Now().Before(p.lastProposedAt.Add(p.MinProposingInternal)) - txListsBytes = make([][]byte, p.MaxProposedTxListsPerEpoch) + txListsBytes = make([][]byte, 0) ) // Wait until L2 execution engine is synced at first. @@ -314,7 +314,7 @@ func (p *Proposer) ProposeOp(ctx context.Context) error { return fmt.Errorf("failed to encode transactions: %w", err) } - txListsBytes[i] = txListBytes + txListsBytes = append(txListsBytes, txListBytes) } for i, err := range p.ProposeTxLists(ctx, txListsBytes) {