mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
Add annouce-txs, maxpeers 25
This commit is contained in:
parent
f5e8c999a2
commit
f0cf0a9f15
5 changed files with 10 additions and 5 deletions
|
|
@ -27,6 +27,7 @@ ENV NETWORK_ID '89'
|
||||||
ENV WS_SECRET ''
|
ENV WS_SECRET ''
|
||||||
ENV NETSTATS_HOST 'netstats-server'
|
ENV NETSTATS_HOST 'netstats-server'
|
||||||
ENV NETSTATS_PORT '3000'
|
ENV NETSTATS_PORT '3000'
|
||||||
|
ENV ANNOUNCE_TXS ''
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/params"
|
"github.com/ethereum/go-ethereum/params"
|
||||||
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
|
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
|
||||||
"github.com/naoina/toml"
|
"github.com/naoina/toml"
|
||||||
"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ accountsCount=$(
|
||||||
|
|
||||||
# file to env
|
# file to env
|
||||||
for env in IDENTITY PASSWORD PRIVATE_KEY BOOTNODES WS_SECRET NETSTATS_HOST \
|
for env in IDENTITY PASSWORD PRIVATE_KEY BOOTNODES WS_SECRET NETSTATS_HOST \
|
||||||
NETSTATS_PORT EXTIP SYNC_MODE NETWORK_ID; do
|
NETSTATS_PORT EXTIP SYNC_MODE NETWORK_ID ANNOUNCE_TXS; do
|
||||||
file=$(eval echo "\$${env}_FILE")
|
file=$(eval echo "\$${env}_FILE")
|
||||||
if [[ -f $file ]] && [[ ! -z $file ]]; then
|
if [[ -f $file ]] && [[ ! -z $file ]]; then
|
||||||
echo "Replacing $env by $file"
|
echo "Replacing $env by $file"
|
||||||
|
|
@ -139,6 +139,11 @@ else
|
||||||
echo "WS_SECRET not set, will not report to netstats server."
|
echo "WS_SECRET not set, will not report to netstats server."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# annonce txs
|
||||||
|
if [[ ! -z $ANNOUNCE_TXS ]]; then
|
||||||
|
params="$params --announce-txs"
|
||||||
|
fi
|
||||||
|
|
||||||
# dump
|
# dump
|
||||||
echo "dump: $IDENTITY $account $BOOTNODES"
|
echo "dump: $IDENTITY $account $BOOTNODES"
|
||||||
|
|
||||||
|
|
@ -151,7 +156,7 @@ exec XDC $params \
|
||||||
--identity $IDENTITY \
|
--identity $IDENTITY \
|
||||||
--password ./password \
|
--password ./password \
|
||||||
--port 30303 \
|
--port 30303 \
|
||||||
--maxpeers 50 \
|
--maxpeers 25 \
|
||||||
--txpool.globalqueue 5000 \
|
--txpool.globalqueue 5000 \
|
||||||
--txpool.globalslots 5000 \
|
--txpool.globalslots 5000 \
|
||||||
--rpc \
|
--rpc \
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ import (
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/common/math"
|
"github.com/ethereum/go-ethereum/common/math"
|
||||||
"github.com/ethereum/go-ethereum/consensus/XDPos"
|
"github.com/ethereum/go-ethereum/consensus/XDPoS"
|
||||||
"github.com/ethereum/go-ethereum/consensus/ethash"
|
"github.com/ethereum/go-ethereum/consensus/ethash"
|
||||||
"github.com/ethereum/go-ethereum/contracts"
|
"github.com/ethereum/go-ethereum/contracts"
|
||||||
"github.com/ethereum/go-ethereum/core"
|
"github.com/ethereum/go-ethereum/core"
|
||||||
|
|
|
||||||
|
|
@ -564,7 +564,7 @@ func decodePacket(buf []byte) (packet, NodeID, []byte, error) {
|
||||||
}
|
}
|
||||||
var req packet
|
var req packet
|
||||||
switch ptype := sigdata[0]; ptype {
|
switch ptype := sigdata[0]; ptype {
|
||||||
case pingXDCt:
|
case pingXDC:
|
||||||
req = new(ping)
|
req = new(ping)
|
||||||
case pongPacket:
|
case pongPacket:
|
||||||
req = new(pong)
|
req = new(pong)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue