Merge pull request #4353 from zgfzgf/feat-compute-tipSet-state
optimize code use ts.Cids
This commit is contained in:
commit
1350079503
@ -426,12 +426,7 @@ func (sm *StateManager) computeTipSetState(ctx context.Context, ts *types.TipSet
|
|||||||
parentEpoch = parent.Height
|
parentEpoch = parent.Height
|
||||||
}
|
}
|
||||||
|
|
||||||
cids := make([]cid.Cid, len(blks))
|
r := store.NewChainRand(sm.cs, ts.Cids())
|
||||||
for i, v := range blks {
|
|
||||||
cids[i] = v.Cid()
|
|
||||||
}
|
|
||||||
|
|
||||||
r := store.NewChainRand(sm.cs, cids)
|
|
||||||
|
|
||||||
blkmsgs, err := sm.cs.BlockMsgsForTipset(ts)
|
blkmsgs, err := sm.cs.BlockMsgsForTipset(ts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user