This commit is contained in:
David Terpay 2023-08-21 19:23:05 -04:00 committed by GitHub
parent 6745a20e99
commit 09f027d7ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -146,14 +146,12 @@ func ChainPrepareLanes(chain ...block.Lane) block.PrepareLanesHandler {
lane.Logger().Error("failed to prepare lane", "lane", lane.Name(), "err", err, "recover_error", rec)
lane.Logger().Info("skipping lane", "lane", lane.Name())
lanesRemaining := len(chain)
switch {
case lanesRemaining <= 2:
if len(chain) <= 2 {
// If there are only two lanes remaining, then the first lane in the chain
// is the lane that failed to prepare the partial proposal and the second lane in the
// chain is the terminator lane. We return the proposal as is.
finalProposal, err = partialProposal, nil
default:
} else {
// If there are more than two lanes remaining, then the first lane in the chain
// is the lane that failed to prepare the proposal but the second lane in the
// chain is not the terminator lane so there could potentially be more transactions

View File

@ -140,7 +140,7 @@ func (p *Proposal) UpdateProposal(lane LaneProposal, partialProposalTxs [][]byte
p.cache[txHashStr] = struct{}{}
lane.Logger().Info(
"added transaction to proposal",
"adding transaction to proposal",
"lane", lane.Name(),
"tx_hash", txHashStr,
"tx_bytes", len(tx),
@ -148,11 +148,11 @@ func (p *Proposal) UpdateProposal(lane LaneProposal, partialProposalTxs [][]byte
}
lane.Logger().Info(
"added transactions to proposal",
"lane successfully updated proposal",
"lane", lane.Name(),
"num_txs", len(partialProposalTxs),
"total_tx_bytes", partialProposalSize,
"cumulative_size", updatedSize,
"partial_proposal_size", partialProposalSize,
"cumulative_proposal_size", updatedSize,
)
return nil