mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Merge pull request #459 from tomochain/thanhson1085-custom-maxpeers
Allow custom maxpeers
This commit is contained in:
commit
10712d0c7a
1 changed files with 8 additions and 2 deletions
|
|
@ -7,6 +7,7 @@
|
|||
# - BOOTNODES (default to empty)
|
||||
# - EXTIP (default to empty)
|
||||
# - VERBOSITY (default to 3)
|
||||
# - MAXPEERS (default to 25)
|
||||
# - SYNC_MODE (default to 'full')
|
||||
# - NETWORK_ID (default to '89')
|
||||
# - WS_SECRET (default to empty)
|
||||
|
|
@ -28,7 +29,7 @@ accountsCount=$(
|
|||
|
||||
# file to env
|
||||
for env in IDENTITY PASSWORD PRIVATE_KEY BOOTNODES WS_SECRET NETSTATS_HOST \
|
||||
NETSTATS_PORT EXTIP SYNC_MODE NETWORK_ID ANNOUNCE_TXS STORE_REWARD DEBUG_MODE; do
|
||||
NETSTATS_PORT EXTIP SYNC_MODE NETWORK_ID ANNOUNCE_TXS STORE_REWARD DEBUG_MODE MAXPEERS; do
|
||||
file=$(eval echo "\$${env}_FILE")
|
||||
if [[ -f $file ]] && [[ ! -z $file ]]; then
|
||||
echo "Replacing $env by $file"
|
||||
|
|
@ -155,6 +156,11 @@ if [[ ! -z $DEBUG_MODE ]]; then
|
|||
params="$params --gcmode archive --rpcapi db,eth,net,web3,personal,debug"
|
||||
fi
|
||||
|
||||
# maxpeers
|
||||
if [[ -z $MAXPEERS ]]; then
|
||||
MAXPEERS=25
|
||||
fi
|
||||
|
||||
# dump
|
||||
echo "dump: $IDENTITY $account $BOOTNODES"
|
||||
|
||||
|
|
@ -165,9 +171,9 @@ exec tomo $params \
|
|||
--datadir $DATA_DIR \
|
||||
--keystore $KEYSTORE_DIR \
|
||||
--identity $IDENTITY \
|
||||
--maxpeers $MAXPEERS \
|
||||
--password ./password \
|
||||
--port 30303 \
|
||||
--maxpeers 25 \
|
||||
--txpool.globalqueue 5000 \
|
||||
--txpool.globalslots 5000 \
|
||||
--rpc \
|
||||
|
|
|
|||
Loading…
Reference in a new issue