diff --git a/abci/abci.go b/abci/abci.go index 1d1c5ac..7373e66 100644 --- a/abci/abci.go +++ b/abci/abci.go @@ -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 diff --git a/block/proposals.go b/block/proposals.go index 8878d9d..5970a38 100644 --- a/block/proposals.go +++ b/block/proposals.go @@ -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