From 0725019bdb37293e1e2190cdf061fedab1f6d06e Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 7 Jun 2021 21:36:40 -0700 Subject: [PATCH] feat(lotus-sim): completely pack block Instead of packing till we see "full". Prove-commits are large, we may have room for some more pre-commits. --- cmd/lotus-sim/simulation/step.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/lotus-sim/simulation/step.go b/cmd/lotus-sim/simulation/step.go index 79ace1db2..0b92ed13e 100644 --- a/cmd/lotus-sim/simulation/step.go +++ b/cmd/lotus-sim/simulation/step.go @@ -246,10 +246,11 @@ func (ss *simulationState) packMessages(ctx context.Context, cb packFunc) error } for _, mgen := range messageGenerators { - if full, err := mgen(ctx, cb); err != nil { + // We're intentionally ignoring the "full" signal so we can try to pack a few more + // messages. + _, err := mgen(ctx, cb) + if err != nil { return xerrors.Errorf("when packing messages with %s: %w", functionName(mgen), err) - } else if full { - break } } return nil