chore: slice loop replace (#11349)
This commit is contained in:
parent
14a7ae339f
commit
2d8dbf5bc1
@ -212,13 +212,8 @@ func (cs *ChainStore) MessagesForTipset(ctx context.Context, ts *types.TipSet) (
|
|||||||
|
|
||||||
var out []types.ChainMsg
|
var out []types.ChainMsg
|
||||||
for _, bm := range bmsgs {
|
for _, bm := range bmsgs {
|
||||||
for _, blsm := range bm.BlsMessages {
|
out = append(out, bm.BlsMessages...)
|
||||||
out = append(out, blsm)
|
out = append(out, bm.SecpkMessages...)
|
||||||
}
|
|
||||||
|
|
||||||
for _, secm := range bm.SecpkMessages {
|
|
||||||
out = append(out, secm)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return out, nil
|
return out, nil
|
||||||
|
@ -656,9 +656,7 @@ func (cs *ChainStore) WalkSnapshot(ctx context.Context, ts *types.TipSet, inclRe
|
|||||||
}
|
}
|
||||||
|
|
||||||
if b.Height > 0 {
|
if b.Height > 0 {
|
||||||
for _, p := range b.Parents {
|
blocksToWalk = append(blocksToWalk, b.Parents...)
|
||||||
blocksToWalk = append(blocksToWalk, p)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// include the genesis block
|
// include the genesis block
|
||||||
cids = append(cids, b.Parents...)
|
cids = append(cids, b.Parents...)
|
||||||
|
Loading…
Reference in New Issue
Block a user