This commit is contained in:
David Terpay
2023-08-21 19:23:05 -04:00
committed by GitHub
parent 6745a20e99
commit 09f027d7ae
2 changed files with 6 additions and 8 deletions
+2 -4
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