cap MaxNonceGap to 16
This commit is contained in:
parent
7b76aa2078
commit
f53d2e3a46
@ -53,7 +53,7 @@ var minimumBaseFee = types.NewInt(uint64(build.MinimumBaseFee))
|
|||||||
|
|
||||||
var MaxActorPendingMessages = 1000
|
var MaxActorPendingMessages = 1000
|
||||||
|
|
||||||
var MaxNonceGap = uint64(runtime.NumCPU())
|
var MaxNonceGap = uint64(16)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrMessageTooBig = errors.New("message too big")
|
ErrMessageTooBig = errors.New("message too big")
|
||||||
@ -82,6 +82,13 @@ const (
|
|||||||
localUpdates = "update"
|
localUpdates = "update"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
numcpus := uint64(runtime.NumCPU())
|
||||||
|
if numcpus < MaxNonceGap {
|
||||||
|
MaxNonceGap = numcpus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type MessagePool struct {
|
type MessagePool struct {
|
||||||
lk sync.Mutex
|
lk sync.Mutex
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user