From 569bcce8780fb016814c88ed1266f4b04d3ef213 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Tue, 3 Dec 2019 12:23:56 -0800 Subject: [PATCH] sorting is not necessary --- miner/miner.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/miner/miner.go b/miner/miner.go index a5dc405c3..ad06acd01 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -2,7 +2,6 @@ package miner import ( "context" - "sort" "sync" "time" @@ -376,10 +375,6 @@ func selectMessages(ctx context.Context, al actorLookup, base *MiningBase, msgs inclNonces := make(map[address.Address]uint64) 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 { if msg.Message.To == address.Undef { log.Warnf("message in mempool had bad 'To' address")