sorting is not necessary

This commit is contained in:
whyrusleeping 2019-12-03 12:23:56 -08:00
parent d0448287a9
commit 569bcce878

View File

@ -2,7 +2,6 @@ package miner
import ( import (
"context" "context"
"sort"
"sync" "sync"
"time" "time"
@ -376,10 +375,6 @@ func selectMessages(ctx context.Context, al actorLookup, base *MiningBase, msgs
inclNonces := make(map[address.Address]uint64) inclNonces := make(map[address.Address]uint64)
inclBalances := make(map[address.Address]types.BigInt) inclBalances := make(map[address.Address]types.BigInt)
sort.Slice(msgs, func(i, j int) bool { // TODO: is this actually needed?
return msgs[i].Message.Nonce < msgs[j].Message.Nonce
})
for _, msg := range msgs { for _, msg := range msgs {
if msg.Message.To == address.Undef { if msg.Message.To == address.Undef {
log.Warnf("message in mempool had bad 'To' address") log.Warnf("message in mempool had bad 'To' address")