aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/transaction_signing.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/types/transaction_signing.go')
-rw-r--r--core/types/transaction_signing.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/types/transaction_signing.go b/core/types/transaction_signing.go
index 99e0c7896..1a13e3e3d 100644
--- a/core/types/transaction_signing.go
+++ b/core/types/transaction_signing.go
@@ -60,7 +60,10 @@ type resultEntry struct {
// Add adds a list of transactions into sig cache.
func (c *globalSigCache) Add(signer Signer, txs Transactions) (errorTx *Transaction, err error) {
- num := runtime.NumCPU()
+ num := runtime.NumCPU() - 2
+ if num < 1 {
+ num = 1
+ }
batchSize := len(txs) / num
wg := sync.WaitGroup{}
wg.Add(num)