diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index 951c74a2c..556c20198 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -53,7 +53,7 @@ var minimumBaseFee = types.NewInt(uint64(build.MinimumBaseFee)) var MaxActorPendingMessages = 1000 -var MaxNonceGap = uint64(runtime.NumCPU()) +var MaxNonceGap = uint64(16) var ( ErrMessageTooBig = errors.New("message too big") @@ -82,6 +82,13 @@ const ( localUpdates = "update" ) +func init() { + numcpus := uint64(runtime.NumCPU()) + if numcpus < MaxNonceGap { + MaxNonceGap = numcpus + } +} + type MessagePool struct { lk sync.Mutex