Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
parent
261285c8fa
commit
7c24d56743
@ -315,7 +315,7 @@ func (c *Consensus[T]) PrepareProposal(
|
||||
}
|
||||
|
||||
decodedTxs := make([]T, len(req.Txs))
|
||||
for _, tx := range req.Txs {
|
||||
for i, tx := range req.Txs {
|
||||
decTx, err := c.txCodec.Decode(tx)
|
||||
if err != nil {
|
||||
// TODO: vote extension meta data as a custom type to avoid possibly accepting invalid txs
|
||||
@ -323,7 +323,8 @@ func (c *Consensus[T]) PrepareProposal(
|
||||
c.logger.Error("failed to decode tx", "err", err)
|
||||
continue
|
||||
}
|
||||
decodedTxs = append(decodedTxs, decTx)
|
||||
|
||||
decodedTxs[i] = decTx
|
||||
}
|
||||
|
||||
ciCtx := contextWithCometInfo(ctx, comet.Info{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user