use stable sort for chain sorting
the default non-stable sort may reorder chains with the same gasPerf, which might change the order of messages per nonce; facepalm.
This commit is contained in:
parent
16a1f9b682
commit
7a8c74fee8
@ -44,7 +44,7 @@ func (mp *MessagePool) pruneMessages(ctx context.Context, ts *types.TipSet) erro
|
||||
}
|
||||
|
||||
// Sort the chains
|
||||
sort.Slice(chains, func(i, j int) bool {
|
||||
sort.SliceStable(chains, func(i, j int) bool {
|
||||
return chains[i].Before(chains[j])
|
||||
})
|
||||
|
||||
|
@ -60,7 +60,7 @@ func (mp *MessagePool) selectMessages(curTs, ts *types.TipSet) ([]*types.SignedM
|
||||
}
|
||||
|
||||
// 2. Sort the chains
|
||||
sort.Slice(chains, func(i, j int) bool {
|
||||
sort.SliceStable(chains, func(i, j int) bool {
|
||||
return chains[i].Before(chains[j])
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user