I prefer this style:

```erlang
WeightInfo = case Type of
     block -> State#state.blocks;
     manifest -> State#state.manifests
   end,
 case decide_bag(WeightInfo) of
   ...