chore: slice loop replace (#11349)

This commit is contained in:
guangwu 2023-10-25 01:02:28 +08:00 committed by GitHub
parent 14a7ae339f
commit 2d8dbf5bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 10 deletions

View File

@ -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

View File

@ -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...)