Skip to content

Commit

Permalink
Revert "make the number of p2p parallel enqueue routines fixable (#4)"
Browse files Browse the repository at this point in the history
This reverts commit 13b41d4.
  • Loading branch information
bnoieh committed Dec 27, 2024
1 parent d453f89 commit 89d8d54
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions eth/handler_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,26 @@ import (
"errors"
"fmt"
"math/big"
"runtime"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/eth/fetcher"
"github.com/ethereum/go-ethereum/eth/protocols/eth"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/p2p/enode"
)

// TxQueueSize is the size of the transaction queue used to enqueue transactions
var (
TxQueueSize = runtime.NumCPU()
const (
TxQueueSize = 16
)

// enqueueTx is a channel to enqueue transactions in parallel.
// It is used to improve the performance of transaction enqueued.
var enqueueTx = make(chan func(), TxQueueSize)

func init() {
log.Info("P2P euqneue parallel thread number", "threadNum", TxQueueSize)
// run the transaction enqueuing loop
for i := 0; i < TxQueueSize; i++ {
go func() {
Expand Down

0 comments on commit 89d8d54

Please sign in to comment.