Merge pull request #4353 from zgfzgf/feat-compute-tipSet-state

optimize code use ts.Cids
This commit is contained in:
Łukasz Magiera 2020-10-15 03:03:39 +02:00 committed by GitHub
commit 1350079503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -426,12 +426,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 {