Skip to content

Commit

Permalink
chore: slice loop replace (#11349)
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill authored Oct 24, 2023
1 parent 14a7ae3 commit 2d8dbf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 2 additions & 7 deletions chain/store/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,8 @@ func (cs *ChainStore) MessagesForTipset(ctx context.Context, ts *types.TipSet) (

var out []types.ChainMsg
for _, bm := range bmsgs {
for _, blsm := range bm.BlsMessages {
out = append(out, blsm)
}

for _, secm := range bm.SecpkMessages {
out = append(out, secm)
}
out = append(out, bm.BlsMessages...)
out = append(out, bm.SecpkMessages...)
}

return out, nil
Expand Down
4 changes: 1 addition & 3 deletions chain/store/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,7 @@ func (cs *ChainStore) WalkSnapshot(ctx context.Context, ts *types.TipSet, inclRe
}

if b.Height > 0 {
for _, p := range b.Parents {
blocksToWalk = append(blocksToWalk, p)
}
blocksToWalk = append(blocksToWalk, b.Parents...)
} else {
// include the genesis block
cids = append(cids, b.Parents...)
Expand Down

0 comments on commit 2d8dbf5

Please sign in to comment.