init (#12)
This commit is contained in:
parent
6745a20e99
commit
09f027d7ae
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user