optimize code use ts.Cids

This commit is contained in:
zgfzgf 2020-10-13 10:46:41 +08:00
parent 8232cc8415
commit 07d0b67628

View File

@ -435,12 +435,7 @@ func (sm *StateManager) computeTipSetState(ctx context.Context, ts *types.TipSet
parentEpoch = parent.Height
}
cids := make([]cid.Cid, len(blks))
for i, v := range blks {
cids[i] = v.Cid()
}
r := store.NewChainRand(sm.cs, cids)
r := store.NewChainRand(sm.cs, ts.Cids())
blkmsgs, err := sm.cs.BlockMsgsForTipset(ts)
if err != nil {