Merge pull request #4366 from zgfzgf/feat-applyblocks-map
optimize map use struct{}
This commit is contained in:
commit
22f49f8946
@ -309,7 +309,7 @@ func (sm *StateManager) ApplyBlocks(ctx context.Context, parentEpoch abi.ChainEp
|
|||||||
}
|
}
|
||||||
|
|
||||||
var receipts []cbg.CBORMarshaler
|
var receipts []cbg.CBORMarshaler
|
||||||
processedMsgs := map[cid.Cid]bool{}
|
processedMsgs := make(map[cid.Cid]struct{})
|
||||||
for _, b := range bms {
|
for _, b := range bms {
|
||||||
penalty := types.NewInt(0)
|
penalty := types.NewInt(0)
|
||||||
gasReward := big.Zero()
|
gasReward := big.Zero()
|
||||||
@ -333,7 +333,7 @@ func (sm *StateManager) ApplyBlocks(ctx context.Context, parentEpoch abi.ChainEp
|
|||||||
return cid.Undef, cid.Undef, err
|
return cid.Undef, cid.Undef, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
processedMsgs[m.Cid()] = true
|
processedMsgs[m.Cid()] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
params, err := actors.SerializeParams(&reward.AwardBlockRewardParams{
|
params, err := actors.SerializeParams(&reward.AwardBlockRewardParams{
|
||||||
|
Loading…
Reference in New Issue
Block a user