mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
port change
This commit is contained in:
parent
1a4e68721a
commit
74f3d788d2
41 changed files with 112 additions and 114 deletions
|
|
@ -12,5 +12,5 @@ FROM alpine:latest
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
|
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
|
||||||
|
|
||||||
EXPOSE 8545 8546 30303 30303/udp 30304/udp
|
EXPOSE 8545 8546 30103 30103/udp 30104/udp
|
||||||
ENTRYPOINT ["geth"]
|
ENTRYPOINT ["geth"]
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,4 @@ FROM alpine:latest
|
||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/
|
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/
|
||||||
|
|
||||||
EXPOSE 8545 8546 30303 30303/udp 30304/udp
|
EXPOSE 8545 8546 30103 30103/udp 30104/udp
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ One of the quickest ways to get Ethereum up and running on your machine is by us
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
|
docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
|
||||||
-p 8545:8545 -p 30303:30303 \
|
-p 8545:8545 -p 30103:30103 \
|
||||||
ethereum/client-go --fast --cache=512
|
ethereum/client-go --fast --cache=512
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,14 @@ Section "Geth" GETH_IDX
|
||||||
createShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "" ""
|
createShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "" ""
|
||||||
|
|
||||||
# Firewall - remove rules (if exists)
|
# Firewall - remove rules (if exists)
|
||||||
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
|
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30103)"
|
||||||
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
|
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30103)"
|
||||||
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30103)"
|
||||||
|
|
||||||
# Firewall - add rules
|
# Firewall - add rules
|
||||||
SimpleFC::AdvAddRule "Geth incoming peers (TCP:30303)" "" 6 1 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" 30303 "" "" ""
|
SimpleFC::AdvAddRule "Geth incoming peers (TCP:30103)" "" 6 1 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" 30103 "" "" ""
|
||||||
SimpleFC::AdvAddRule "Geth outgoing peers (TCP:30303)" "" 6 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
SimpleFC::AdvAddRule "Geth outgoing peers (TCP:30103)" "" 6 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30103 "" ""
|
||||||
SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30303)" "" 17 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30303 "" ""
|
SimpleFC::AdvAddRule "Geth UDP discovery (UDP:30103)" "" 17 2 1 2147483647 1 "$INSTDIR\geth.exe" "" "" "Ethereum" "" 30103 "" ""
|
||||||
|
|
||||||
# Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
# Set default IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
||||||
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
${EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@ Section "Uninstall"
|
||||||
rmDir "$SMPROGRAMS\${APPNAME}"
|
rmDir "$SMPROGRAMS\${APPNAME}"
|
||||||
|
|
||||||
# Firewall - remove rules if exists
|
# Firewall - remove rules if exists
|
||||||
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30303)"
|
SimpleFC::AdvRemoveRule "Geth incoming peers (TCP:30103)"
|
||||||
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30303)"
|
SimpleFC::AdvRemoveRule "Geth outgoing peers (TCP:30103)"
|
||||||
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30303)"
|
SimpleFC::AdvRemoveRule "Geth UDP discovery (UDP:30103)"
|
||||||
|
|
||||||
# Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
# Remove IPC endpoint (https://github.com/ethereum/EIPs/issues/147)
|
||||||
${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
${un.EnvVarUpdate} $0 "ETHEREUM_SOCKET" "R" "HKLM" "\\.\pipe\geth.ipc"
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ import (
|
||||||
var (
|
var (
|
||||||
genesisFlag = flag.String("genesis", "", "Genesis json file to seed the chain with")
|
genesisFlag = flag.String("genesis", "", "Genesis json file to seed the chain with")
|
||||||
apiPortFlag = flag.Int("apiport", 8080, "Listener port for the HTTP API connection")
|
apiPortFlag = flag.Int("apiport", 8080, "Listener port for the HTTP API connection")
|
||||||
ethPortFlag = flag.Int("ethport", 30303, "Listener port for the devp2p connection")
|
ethPortFlag = flag.Int("ethport", 30103, "Listener port for the devp2p connection")
|
||||||
bootFlag = flag.String("bootnodes", "", "Comma separated bootnode enode URLs to seed with")
|
bootFlag = flag.String("bootnodes", "", "Comma separated bootnode enode URLs to seed with")
|
||||||
netFlag = flag.Uint64("network", 0, "Network ID to use for the Ethereum protocol")
|
netFlag = flag.Uint64("network", 0, "Network ID to use for the Ethereum protocol")
|
||||||
statsFlag = flag.String("ethstats", "", "Ethstats network monitoring auth string")
|
statsFlag = flag.String("ethstats", "", "Ethstats network monitoring auth string")
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ ADD genesis.json /genesis.json
|
||||||
ADD account.json /account.json
|
ADD account.json /account.json
|
||||||
ADD account.pass /account.pass
|
ADD account.pass /account.pass
|
||||||
|
|
||||||
EXPOSE 8080 30303 30303/udp
|
EXPOSE 8080 30103 30103/udp
|
||||||
|
|
||||||
ENTRYPOINT [ \
|
ENTRYPOINT [ \
|
||||||
"faucet", "--genesis", "/genesis.json", "--network", "{{.NetworkID}}", "--bootnodes", "{{.Bootnodes}}", "--ethstats", "{{.Ethstats}}", "--ethport", "{{.EthPort}}", \
|
"faucet", "--genesis", "/genesis.json", "--network", "{{.NetworkID}}", "--bootnodes", "{{.Bootnodes}}", "--ethstats", "{{.Ethstats}}", "--ethport", "{{.EthPort}}", \
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ func (w *wizard) deployExplorer() {
|
||||||
infos, err := checkExplorer(client, w.network)
|
infos, err := checkExplorer(client, w.network)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
infos = &explorerInfos{
|
infos = &explorerInfos{
|
||||||
nodePort: 30303, webPort: 80, webHost: client.server,
|
nodePort: 30103, webPort: 80, webHost: client.server,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
existed := err == nil
|
existed := err == nil
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ func (w *wizard) deployFaucet() {
|
||||||
infos, err := checkFaucet(client, w.network)
|
infos, err := checkFaucet(client, w.network)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
infos = &faucetInfos{
|
infos = &faucetInfos{
|
||||||
node: &nodeInfos{portFull: 30303, peersTotal: 25},
|
node: &nodeInfos{portFull: 30103, peersTotal: 25},
|
||||||
port: 80,
|
port: 80,
|
||||||
host: client.server,
|
host: client.server,
|
||||||
amount: 1,
|
amount: 1,
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@ func (w *wizard) deployNode(boot bool) {
|
||||||
infos, err := checkNode(client, w.network, boot)
|
infos, err := checkNode(client, w.network, boot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if boot {
|
if boot {
|
||||||
infos = &nodeInfos{portFull: 30303, peersTotal: 512, peersLight: 256}
|
infos = &nodeInfos{portFull: 30103, peersTotal: 512, peersLight: 256}
|
||||||
} else {
|
} else {
|
||||||
infos = &nodeInfos{portFull: 30303, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18}
|
infos = &nodeInfos{portFull: 30103, peersTotal: 50, peersLight: 0, gasTarget: 4.7, gasPrice: 18}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
existed := err == nil
|
existed := err == nil
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ func (w *wizard) deployWallet() {
|
||||||
infos, err := checkWallet(client, w.network)
|
infos, err := checkWallet(client, w.network)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
infos = &walletInfos{
|
infos = &walletInfos{
|
||||||
nodePort: 30303, rpcPort: 8545, webPort: 80, webHost: client.server,
|
nodePort: 30103, rpcPort: 8545, webPort: 80, webHost: client.server,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
existed := err == nil
|
existed := err == nil
|
||||||
|
|
|
||||||
|
|
@ -457,7 +457,7 @@ var (
|
||||||
ListenPortFlag = cli.IntFlag{
|
ListenPortFlag = cli.IntFlag{
|
||||||
Name: "port",
|
Name: "port",
|
||||||
Usage: "Network listening port",
|
Usage: "Network listening port",
|
||||||
Value: 30303,
|
Value: 30103,
|
||||||
}
|
}
|
||||||
BootnodesFlag = cli.StringFlag{
|
BootnodesFlag = cli.StringFlag{
|
||||||
Name: "bootnodes",
|
Name: "bootnodes",
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ var (
|
||||||
argPoW = flag.Float64("pow", whisper.DefaultMinimumPoW, "PoW for normal messages in float format (e.g. 2.7)")
|
argPoW = flag.Float64("pow", whisper.DefaultMinimumPoW, "PoW for normal messages in float format (e.g. 2.7)")
|
||||||
argServerPoW = flag.Float64("mspow", whisper.DefaultMinimumPoW, "PoW requirement for Mail Server request")
|
argServerPoW = flag.Float64("mspow", whisper.DefaultMinimumPoW, "PoW requirement for Mail Server request")
|
||||||
|
|
||||||
argIP = flag.String("ip", "", "IP address and port of this node (e.g. 127.0.0.1:30303)")
|
argIP = flag.String("ip", "", "IP address and port of this node (e.g. 127.0.0.1:30103)")
|
||||||
argPub = flag.String("pub", "", "public key for asymmetric encryption")
|
argPub = flag.String("pub", "", "public key for asymmetric encryption")
|
||||||
argDBPath = flag.String("dbpath", "", "path to the server's DB directory")
|
argDBPath = flag.String("dbpath", "", "path to the server's DB directory")
|
||||||
argIDFile = flag.String("idfile", "", "file name with node id (private key)")
|
argIDFile = flag.String("idfile", "", "file name with node id (private key)")
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ RUN \
|
||||||
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
EXPOSE 8545
|
EXPOSE 8545
|
||||||
EXPOSE 30303
|
EXPOSE 30103
|
||||||
|
|
||||||
ENTRYPOINT ["/geth"]
|
ENTRYPOINT ["/geth"]
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,6 @@ RUN \
|
||||||
rm -rf /go-ethereum
|
rm -rf /go-ethereum
|
||||||
|
|
||||||
EXPOSE 8545
|
EXPOSE 8545
|
||||||
EXPOSE 30303
|
EXPOSE 30103
|
||||||
|
|
||||||
ENTRYPOINT ["/geth"]
|
ENTRYPOINT ["/geth"]
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ RUN \
|
||||||
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
rm -rf /go-ethereum && rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
EXPOSE 8545
|
EXPOSE 8545
|
||||||
EXPOSE 30303
|
EXPOSE 30103
|
||||||
|
|
||||||
ENTRYPOINT ["/geth"]
|
ENTRYPOINT ["/geth"]
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,6 @@ RUN \
|
||||||
rm -rf /go-ethereum
|
rm -rf /go-ethereum
|
||||||
|
|
||||||
EXPOSE 8545
|
EXPOSE 8545
|
||||||
EXPOSE 30303
|
EXPOSE 30103
|
||||||
|
|
||||||
ENTRYPOINT ["/geth"]
|
ENTRYPOINT ["/geth"]
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ func (s *StateSuite) TestDump(c *checker.C) {
|
||||||
"nonce": 0,
|
"nonce": 0,
|
||||||
"root": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
"root": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
|
||||||
"codeHash": "87874902497a5bb968da31a2998d8f22e949d1ef6214bcdedd8bae24cca4b9e3",
|
"codeHash": "87874902497a5bb968da31a2998d8f22e949d1ef6214bcdedd8bae24cca4b9e3",
|
||||||
"code": "03030303030303",
|
"code": "03010303010303",
|
||||||
"storage": {}
|
"storage": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26105,7 +26105,7 @@ var _bundleJs = []byte((((((((((`!function(modules) {
|
||||||
divider: "rgba(255, 255, 255, 0.12)",
|
divider: "rgba(255, 255, 255, 0.12)",
|
||||||
background: {
|
background: {
|
||||||
paper: _grey2.default[800],
|
paper: _grey2.default[800],
|
||||||
default: "#303030",
|
default: "#301030",
|
||||||
appBar: _grey2.default[900],
|
appBar: _grey2.default[900],
|
||||||
chip: _grey2.default[700],
|
chip: _grey2.default[700],
|
||||||
avatar: _grey2.default[600]
|
avatar: _grey2.default[600]
|
||||||
|
|
@ -26181,7 +26181,7 @@ var _bundleJs = []byte((((((((((`!function(modules) {
|
||||||
900: "#212121",
|
900: "#212121",
|
||||||
A100: "#d5d5d5",
|
A100: "#d5d5d5",
|
||||||
A200: "#aaaaaa",
|
A200: "#aaaaaa",
|
||||||
A400: "#303030",
|
A400: "#301030",
|
||||||
A700: "#616161"
|
A700: "#616161"
|
||||||
};
|
};
|
||||||
exports.default = grey;
|
exports.default = grey;
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,10 @@ type Enode struct {
|
||||||
// query parameter "discport".
|
// query parameter "discport".
|
||||||
//
|
//
|
||||||
// In the following example, the node URL describes
|
// In the following example, the node URL describes
|
||||||
// a node with IP address 10.3.58.6, TCP listening port 30303
|
// a node with IP address 10.3.58.6, TCP listening port 30103
|
||||||
// and UDP discovery port 30301.
|
// and UDP discovery port 30301.
|
||||||
//
|
//
|
||||||
// enode://<hex node id>@10.3.58.6:30303?discport=30301
|
// enode://<hex node id>@10.3.58.6:30103?discport=30301
|
||||||
func NewEnode(rawurl string) (enode *Enode, _ error) {
|
func NewEnode(rawurl string) (enode *Enode, _ error) {
|
||||||
node, err := discv5.ParseNode(rawurl)
|
node, err := discv5.ParseNode(rawurl)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ var DefaultConfig = Config{
|
||||||
WSPort: DefaultWSPort,
|
WSPort: DefaultWSPort,
|
||||||
WSModules: []string{"net", "web3"},
|
WSModules: []string{"net", "web3"},
|
||||||
P2P: p2p.Config{
|
P2P: p2p.Config{
|
||||||
ListenAddr: ":30303",
|
ListenAddr: ":30103",
|
||||||
MaxPeers: 25,
|
MaxPeers: 25,
|
||||||
NAT: nat.Any(),
|
NAT: nat.Any(),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,8 @@ func TestNodeDBFetchStore(t *testing.T) {
|
||||||
node := NewNode(
|
node := NewNode(
|
||||||
MustHexID("0x1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{192, 168, 0, 1},
|
net.IP{192, 168, 0, 1},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
)
|
)
|
||||||
inst := time.Now()
|
inst := time.Now()
|
||||||
num := 314
|
num := 314
|
||||||
|
|
@ -168,8 +168,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x84d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x84d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 3},
|
net.IP{127, 0, 0, 3},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-3 * time.Hour),
|
pong: time.Now().Add(-3 * time.Hour),
|
||||||
},
|
},
|
||||||
|
|
@ -179,8 +179,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x57d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x57d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 3},
|
net.IP{127, 0, 0, 3},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-4 * time.Second),
|
pong: time.Now().Add(-4 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -190,8 +190,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x22d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x22d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 1},
|
net.IP{127, 0, 0, 1},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-2 * time.Second),
|
pong: time.Now().Add(-2 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -199,8 +199,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x44d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x44d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 2},
|
net.IP{127, 0, 0, 2},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-3 * time.Second),
|
pong: time.Now().Add(-3 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -208,8 +208,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0xe2d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0xe2d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 3},
|
net.IP{127, 0, 0, 3},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-1 * time.Second),
|
pong: time.Now().Add(-1 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -306,8 +306,8 @@ var nodeDBExpirationNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 1},
|
net.IP{127, 0, 0, 1},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-nodeDBNodeExpiration + time.Minute),
|
pong: time.Now().Add(-nodeDBNodeExpiration + time.Minute),
|
||||||
exp: false,
|
exp: false,
|
||||||
|
|
@ -315,8 +315,8 @@ var nodeDBExpirationNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 2},
|
net.IP{127, 0, 0, 2},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-nodeDBNodeExpiration - time.Minute),
|
pong: time.Now().Add(-nodeDBNodeExpiration - time.Minute),
|
||||||
exp: true,
|
exp: true,
|
||||||
|
|
|
||||||
|
|
@ -136,10 +136,10 @@ var incompleteNodeURL = regexp.MustCompile("(?i)^(?:enode://)?([0-9a-f]+)$")
|
||||||
// query parameter "discport".
|
// query parameter "discport".
|
||||||
//
|
//
|
||||||
// In the following example, the node URL describes
|
// In the following example, the node URL describes
|
||||||
// a node with IP address 10.3.58.6, TCP listening port 30303
|
// a node with IP address 10.3.58.6, TCP listening port 30103
|
||||||
// and UDP discovery port 30301.
|
// and UDP discovery port 30301.
|
||||||
//
|
//
|
||||||
// enode://<hex node id>@10.3.58.6:30303?discport=30301
|
// enode://<hex node id>@10.3.58.6:30103?discport=30301
|
||||||
func ParseNode(rawurl string) (*Node, error) {
|
func ParseNode(rawurl string) (*Node, error) {
|
||||||
if m := incompleteNodeURL.FindStringSubmatch(rawurl); m != nil {
|
if m := incompleteNodeURL.FindStringSubmatch(rawurl); m != nil {
|
||||||
id, err := HexID(m[1])
|
id, err := HexID(m[1])
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ func ExampleNewNode() {
|
||||||
id := MustHexID("1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439")
|
id := MustHexID("1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439")
|
||||||
|
|
||||||
// Complete nodes contain UDP and TCP endpoints:
|
// Complete nodes contain UDP and TCP endpoints:
|
||||||
n1 := NewNode(id, net.ParseIP("2001:db8:3c4d:15::abcd:ef12"), 52150, 30303)
|
n1 := NewNode(id, net.ParseIP("2001:db8:3c4d:15::abcd:ef12"), 52150, 30103)
|
||||||
fmt.Println("n1:", n1)
|
fmt.Println("n1:", n1)
|
||||||
fmt.Println("n1.Incomplete() ->", n1.Incomplete())
|
fmt.Println("n1.Incomplete() ->", n1.Incomplete())
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ func ExampleNewNode() {
|
||||||
fmt.Println("n2.Incomplete() ->", n2.Incomplete())
|
fmt.Println("n2.Incomplete() ->", n2.Incomplete())
|
||||||
|
|
||||||
// Output:
|
// Output:
|
||||||
// n1: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439@[2001:db8:3c4d:15::abcd:ef12]:30303?discport=52150
|
// n1: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439@[2001:db8:3c4d:15::abcd:ef12]:30103?discport=52150
|
||||||
// n1.Incomplete() -> false
|
// n1.Incomplete() -> false
|
||||||
// n2: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439
|
// n2: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439
|
||||||
// n2.Incomplete() -> true
|
// n2.Incomplete() -> true
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ func newUDPTest(t *testing.T) *udpTest {
|
||||||
pipe: newpipe(),
|
pipe: newpipe(),
|
||||||
localkey: newkey(),
|
localkey: newkey(),
|
||||||
remotekey: newkey(),
|
remotekey: newkey(),
|
||||||
remoteaddr: &net.UDPAddr{IP: net.IP{10, 0, 1, 99}, Port: 30303},
|
remoteaddr: &net.UDPAddr{IP: net.IP{10, 0, 1, 99}, Port: 30103},
|
||||||
}
|
}
|
||||||
realaddr := test.pipe.LocalAddr().(*net.UDPAddr)
|
realaddr := test.pipe.LocalAddr().(*net.UDPAddr)
|
||||||
test.table, test.udp, _ = newUDP(test.localkey, test.pipe, realaddr, nil, "", nil)
|
test.table, test.udp, _ = newUDP(test.localkey, test.pipe, realaddr, nil, "", nil)
|
||||||
|
|
@ -298,10 +298,10 @@ func TestUDP_findnodeMultiReply(t *testing.T) {
|
||||||
|
|
||||||
// send the reply as two packets.
|
// send the reply as two packets.
|
||||||
list := []*Node{
|
list := []*Node{
|
||||||
MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:30303?discport=30304"),
|
MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:30103?discport=30104"),
|
||||||
MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:30303"),
|
MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:30103"),
|
||||||
MustParseNode("enode://9bffefd833d53fac8e652415f4973bee289e8b1a5c6c4cbe70abf817ce8a64cee11b823b66a987f51aaa9fba0d6a91b3e6bf0d5a5d1042de8e9eeea057b217f8@10.0.1.36:30301?discport=17"),
|
MustParseNode("enode://9bffefd833d53fac8e652415f4973bee289e8b1a5c6c4cbe70abf817ce8a64cee11b823b66a987f51aaa9fba0d6a91b3e6bf0d5a5d1042de8e9eeea057b217f8@10.0.1.36:30301?discport=17"),
|
||||||
MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:30303"),
|
MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:30103"),
|
||||||
}
|
}
|
||||||
rpclist := make([]rpcNode, len(list))
|
rpclist := make([]rpcNode, len(list))
|
||||||
for i := range list {
|
for i := range list {
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,8 @@ func TestNodeDBFetchStore(t *testing.T) {
|
||||||
node := NewNode(
|
node := NewNode(
|
||||||
MustHexID("0x1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{192, 168, 0, 1},
|
net.IP{192, 168, 0, 1},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
)
|
)
|
||||||
inst := time.Now()
|
inst := time.Now()
|
||||||
num := 314
|
num := 314
|
||||||
|
|
@ -168,8 +168,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x84d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x84d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 3},
|
net.IP{127, 0, 0, 3},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-3 * time.Hour),
|
pong: time.Now().Add(-3 * time.Hour),
|
||||||
},
|
},
|
||||||
|
|
@ -179,8 +179,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x57d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x57d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 3},
|
net.IP{127, 0, 0, 3},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-4 * time.Second),
|
pong: time.Now().Add(-4 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -190,8 +190,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x22d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x22d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 1},
|
net.IP{127, 0, 0, 1},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-2 * time.Second),
|
pong: time.Now().Add(-2 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -199,8 +199,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x44d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x44d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 2},
|
net.IP{127, 0, 0, 2},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-3 * time.Second),
|
pong: time.Now().Add(-3 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -208,8 +208,8 @@ var nodeDBSeedQueryNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0xe2d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0xe2d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 3},
|
net.IP{127, 0, 0, 3},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-1 * time.Second),
|
pong: time.Now().Add(-1 * time.Second),
|
||||||
},
|
},
|
||||||
|
|
@ -306,8 +306,8 @@ var nodeDBExpirationNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x01d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 1},
|
net.IP{127, 0, 0, 1},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-nodeDBNodeExpiration + time.Minute),
|
pong: time.Now().Add(-nodeDBNodeExpiration + time.Minute),
|
||||||
exp: false,
|
exp: false,
|
||||||
|
|
@ -315,8 +315,8 @@ var nodeDBExpirationNodes = []struct {
|
||||||
node: NewNode(
|
node: NewNode(
|
||||||
MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
MustHexID("0x02d9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439"),
|
||||||
net.IP{127, 0, 0, 2},
|
net.IP{127, 0, 0, 2},
|
||||||
30303,
|
30103,
|
||||||
30303,
|
30103,
|
||||||
),
|
),
|
||||||
pong: time.Now().Add(-nodeDBNodeExpiration - time.Minute),
|
pong: time.Now().Add(-nodeDBNodeExpiration - time.Minute),
|
||||||
exp: true,
|
exp: true,
|
||||||
|
|
|
||||||
|
|
@ -144,10 +144,10 @@ var incompleteNodeURL = regexp.MustCompile("(?i)^(?:enode://)?([0-9a-f]+)$")
|
||||||
// query parameter "discport".
|
// query parameter "discport".
|
||||||
//
|
//
|
||||||
// In the following example, the node URL describes
|
// In the following example, the node URL describes
|
||||||
// a node with IP address 10.3.58.6, TCP listening port 30303
|
// a node with IP address 10.3.58.6, TCP listening port 30103
|
||||||
// and UDP discovery port 30301.
|
// and UDP discovery port 30301.
|
||||||
//
|
//
|
||||||
// enode://<hex node id>@10.3.58.6:30303?discport=30301
|
// enode://<hex node id>@10.3.58.6:30103?discport=30301
|
||||||
func ParseNode(rawurl string) (*Node, error) {
|
func ParseNode(rawurl string) (*Node, error) {
|
||||||
if m := incompleteNodeURL.FindStringSubmatch(rawurl); m != nil {
|
if m := incompleteNodeURL.FindStringSubmatch(rawurl); m != nil {
|
||||||
id, err := HexID(m[1])
|
id, err := HexID(m[1])
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ func ExampleNewNode() {
|
||||||
id := MustHexID("1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439")
|
id := MustHexID("1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439")
|
||||||
|
|
||||||
// Complete nodes contain UDP and TCP endpoints:
|
// Complete nodes contain UDP and TCP endpoints:
|
||||||
n1 := NewNode(id, net.ParseIP("2001:db8:3c4d:15::abcd:ef12"), 52150, 30303)
|
n1 := NewNode(id, net.ParseIP("2001:db8:3c4d:15::abcd:ef12"), 52150, 30103)
|
||||||
fmt.Println("n1:", n1)
|
fmt.Println("n1:", n1)
|
||||||
fmt.Println("n1.Incomplete() ->", n1.Incomplete())
|
fmt.Println("n1.Incomplete() ->", n1.Incomplete())
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ func ExampleNewNode() {
|
||||||
fmt.Println("n2.Incomplete() ->", n2.Incomplete())
|
fmt.Println("n2.Incomplete() ->", n2.Incomplete())
|
||||||
|
|
||||||
// Output:
|
// Output:
|
||||||
// n1: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439@[2001:db8:3c4d:15::abcd:ef12]:30303?discport=52150
|
// n1: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439@[2001:db8:3c4d:15::abcd:ef12]:30103?discport=52150
|
||||||
// n1.Incomplete() -> false
|
// n1.Incomplete() -> false
|
||||||
// n2: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439
|
// n2: enode://1dd9d65c4552b5eb43d5ad55a2ee3f56c6cbc1c64a5c8d659f51fcd51bace24351232b8d7821617d2b29b54b81cdefb9b3e9c37d7fd5f63270bcc9e1a6f6a439
|
||||||
// n2.Incomplete() -> true
|
// n2.Incomplete() -> true
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ func (s *simulation) launchNode(log bool) *Network {
|
||||||
s.nodectr++
|
s.nodectr++
|
||||||
binary.BigEndian.PutUint32(ip, num)
|
binary.BigEndian.PutUint32(ip, num)
|
||||||
ip[0] = 10
|
ip[0] = 10
|
||||||
addr := &net.UDPAddr{IP: ip, Port: 30303}
|
addr := &net.UDPAddr{IP: ip, Port: 30103}
|
||||||
|
|
||||||
transport := &simTransport{joinTime: time.Now(), sender: id, senderAddr: addr, sim: s, priv: key}
|
transport := &simTransport{joinTime: time.Now(), sender: id, senderAddr: addr, sim: s, priv: key}
|
||||||
net, err := newNetwork(transport, key.PublicKey, "<no database>", nil)
|
net, err := newNetwork(transport, key.PublicKey, "<no database>", nil)
|
||||||
|
|
@ -349,8 +349,8 @@ func (st *simTransport) sendPing(remote *Node, remoteAddr *net.UDPAddr, topics [
|
||||||
ev: pingPacket,
|
ev: pingPacket,
|
||||||
data: &ping{
|
data: &ping{
|
||||||
Version: 4,
|
Version: 4,
|
||||||
From: rpcEndpoint{IP: st.senderAddr.IP, UDP: uint16(st.senderAddr.Port), TCP: 30303},
|
From: rpcEndpoint{IP: st.senderAddr.IP, UDP: uint16(st.senderAddr.Port), TCP: 30103},
|
||||||
To: rpcEndpoint{IP: remoteAddr.IP, UDP: uint16(remoteAddr.Port), TCP: 30303},
|
To: rpcEndpoint{IP: remoteAddr.IP, UDP: uint16(remoteAddr.Port), TCP: 30103},
|
||||||
Expiration: uint64(time.Now().Unix() + int64(expiration)),
|
Expiration: uint64(time.Now().Unix() + int64(expiration)),
|
||||||
Topics: topics,
|
Topics: topics,
|
||||||
},
|
},
|
||||||
|
|
@ -367,7 +367,7 @@ func (st *simTransport) sendPong(remote *Node, pingHash []byte) {
|
||||||
hash: st.nextHash(),
|
hash: st.nextHash(),
|
||||||
ev: pongPacket,
|
ev: pongPacket,
|
||||||
data: &pong{
|
data: &pong{
|
||||||
To: rpcEndpoint{IP: raddr.IP, UDP: uint16(raddr.Port), TCP: 30303},
|
To: rpcEndpoint{IP: raddr.IP, UDP: uint16(raddr.Port), TCP: 30103},
|
||||||
ReplyTok: pingHash,
|
ReplyTok: pingHash,
|
||||||
Expiration: uint64(time.Now().Unix() + int64(expiration)),
|
Expiration: uint64(time.Now().Unix() + int64(expiration)),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ var (
|
||||||
// pipe: newpipe(),
|
// pipe: newpipe(),
|
||||||
// localkey: newkey(),
|
// localkey: newkey(),
|
||||||
// remotekey: newkey(),
|
// remotekey: newkey(),
|
||||||
// remoteaddr: &net.UDPAddr{IP: net.IP{1, 2, 3, 4}, Port: 30303},
|
// remoteaddr: &net.UDPAddr{IP: net.IP{1, 2, 3, 4}, Port: 30103},
|
||||||
// }
|
// }
|
||||||
// test.table, test.udp, _ = newUDP(test.localkey, test.pipe, nil, "")
|
// test.table, test.udp, _ = newUDP(test.localkey, test.pipe, nil, "")
|
||||||
// return test
|
// return test
|
||||||
|
|
@ -189,10 +189,10 @@ var (
|
||||||
//
|
//
|
||||||
// // send the reply as two packets.
|
// // send the reply as two packets.
|
||||||
// list := []*Node{
|
// list := []*Node{
|
||||||
// MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:30303?discport=30304"),
|
// MustParseNode("enode://ba85011c70bcc5c04d8607d3a0ed29aa6179c092cbdda10d5d32684fb33ed01bd94f588ca8f91ac48318087dcb02eaf36773a7a453f0eedd6742af668097b29c@10.0.1.16:30103?discport=30104"),
|
||||||
// MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:30303"),
|
// MustParseNode("enode://81fa361d25f157cd421c60dcc28d8dac5ef6a89476633339c5df30287474520caca09627da18543d9079b5b288698b542d56167aa5c09111e55acdbbdf2ef799@10.0.1.16:30103"),
|
||||||
// MustParseNode("enode://9bffefd833d53fac8e652415f4973bee289e8b1a5c6c4cbe70abf817ce8a64cee11b823b66a987f51aaa9fba0d6a91b3e6bf0d5a5d1042de8e9eeea057b217f8@10.0.1.36:30301?discport=17"),
|
// MustParseNode("enode://9bffefd833d53fac8e652415f4973bee289e8b1a5c6c4cbe70abf817ce8a64cee11b823b66a987f51aaa9fba0d6a91b3e6bf0d5a5d1042de8e9eeea057b217f8@10.0.1.36:30301?discport=17"),
|
||||||
// MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:30303"),
|
// MustParseNode("enode://1b5b4aa662d7cb44a7221bfba67302590b643028197a7d5214790f3bac7aaa4a3241be9e83c09cf1f6c69d007c634faae3dc1b1221793e8446c0b3a09de65960@10.0.1.16:30103"),
|
||||||
// }
|
// }
|
||||||
// rpclist := make([]rpcNode, len(list))
|
// rpclist := make([]rpcNode, len(list))
|
||||||
// for i := range list {
|
// for i := range list {
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ func TestGetSetOverwrite(t *testing.T) {
|
||||||
// TestSignEncodeAndDecode tests signing, RLP encoding and RLP decoding of a record.
|
// TestSignEncodeAndDecode tests signing, RLP encoding and RLP decoding of a record.
|
||||||
func TestSignEncodeAndDecode(t *testing.T) {
|
func TestSignEncodeAndDecode(t *testing.T) {
|
||||||
var r Record
|
var r Record
|
||||||
r.Set(DiscPort(30303))
|
r.Set(DiscPort(30103))
|
||||||
r.Set(IP4{127, 0, 0, 1})
|
r.Set(IP4{127, 0, 0, 1})
|
||||||
require.NoError(t, r.Sign(privkey))
|
require.NoError(t, r.Sign(privkey))
|
||||||
|
|
||||||
|
|
@ -249,7 +249,7 @@ func TestPythonInterop(t *testing.T) {
|
||||||
wantAddr, _ = hex.DecodeString("caaa1485d83b18b32ed9ad666026151bf0cae8a0a88c857ae2d4c5be2daa6726")
|
wantAddr, _ = hex.DecodeString("caaa1485d83b18b32ed9ad666026151bf0cae8a0a88c857ae2d4c5be2daa6726")
|
||||||
wantSeq = uint64(1)
|
wantSeq = uint64(1)
|
||||||
wantIP = IP4{127, 0, 0, 1}
|
wantIP = IP4{127, 0, 0, 1}
|
||||||
wantDiscport = DiscPort(30303)
|
wantDiscport = DiscPort(30103)
|
||||||
)
|
)
|
||||||
if r.Seq() != wantSeq {
|
if r.Seq() != wantSeq {
|
||||||
t.Errorf("wrong seq: got %d, want %d", r.Seq(), wantSeq)
|
t.Errorf("wrong seq: got %d, want %d", r.Seq(), wantSeq)
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ The Docker image is built using `docker build` when the adapter is initialised,
|
||||||
meaning no prior setup is necessary other than having a working Docker client.
|
meaning no prior setup is necessary other than having a working Docker client.
|
||||||
|
|
||||||
Each node listens on the external IP of the container and the default p2p and
|
Each node listens on the external IP of the container and the default p2p and
|
||||||
RPC ports (`30303` and `8546` respectively).
|
RPC ports (`30103` and `8546` respectively).
|
||||||
|
|
||||||
## Network
|
## Network
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ func (self *SimNode) Addr() []byte {
|
||||||
|
|
||||||
// Node returns a discover.Node representing the SimNode
|
// Node returns a discover.Node representing the SimNode
|
||||||
func (self *SimNode) Node() *discover.Node {
|
func (self *SimNode) Node() *discover.Node {
|
||||||
return discover.NewNode(self.ID, net.IP{127, 0, 0, 1}, 30303, 30303)
|
return discover.NewNode(self.ID, net.IP{127, 0, 0, 1}, 30103, 30103)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Client returns an rpc.Client which can be used to communicate with the
|
// Client returns an rpc.Client which can be used to communicate with the
|
||||||
|
|
|
||||||
|
|
@ -20,38 +20,36 @@ package params
|
||||||
// the main Ethereum network.
|
// the main Ethereum network.
|
||||||
var MainnetBootnodes = []string{
|
var MainnetBootnodes = []string{
|
||||||
// Ethereum Foundation Go Bootnodes
|
// Ethereum Foundation Go Bootnodes
|
||||||
"enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30303", // IE
|
"enode://a979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c@52.16.188.185:30103", // IE
|
||||||
"enode://3f1d12044546b76342d59d4a05532c14b85aa669704bfe1f864fe079415aa2c02d743e03218e57a33fb94523adb54032871a6c51b2cc5514cb7c7e35b3ed0a99@13.93.211.84:30303", // US-WEST
|
"enode://3f1d12044546b76342d59d4a05532c14b85aa669704bfe1f864fe079415aa2c02d743e03218e57a33fb94523adb54032871a6c51b2cc5514cb7c7e35b3ed0a99@13.93.211.84:30103", // US-WEST
|
||||||
"enode://78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d@191.235.84.50:30303", // BR
|
"enode://78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d@191.235.84.50:30103", // BR
|
||||||
"enode://158f8aab45f6d19c6cbf4a089c2670541a8da11978a2f90dbf6a502a4a3bab80d288afdbeb7ec0ef6d92de563767f3b1ea9e8e334ca711e9f8e2df5a0385e8e6@13.75.154.138:30303", // AU
|
"enode://158f8aab45f6d19c6cbf4a089c2670541a8da11978a2f90dbf6a502a4a3bab80d288afdbeb7ec0ef6d92de563767f3b1ea9e8e334ca711e9f8e2df5a0385e8e6@13.75.154.138:30103", // AU
|
||||||
"enode://1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082@52.74.57.123:30303", // SG
|
"enode://1118980bf48b0a3640bdba04e0fe78b1add18e1cd99bf22d53daac1fd9972ad650df52176e7c7d89d1114cfef2bc23a2959aa54998a46afcf7d91809f0855082@52.74.57.123:30103", // SG
|
||||||
|
|
||||||
// Ethereum Foundation C++ Bootnodes
|
// Ethereum Foundation C++ Bootnodes
|
||||||
"enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30303", // DE
|
"enode://979b7fa28feeb35a4741660a16076f1943202cb72b6af70d327f053e248bab9ba81760f39d0701ef1d8f89cc1fbd2cacba0710a12cd5314d5e0c9021aa3637f9@5.1.83.226:30103", // DE
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the
|
// TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the
|
||||||
// Ropsten test network.
|
// Ropsten test network.
|
||||||
var TestnetBootnodes = []string{
|
var TestnetBootnodes = []string{
|
||||||
"enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303", // US-TX
|
"enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30103", // US-TX
|
||||||
"enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303", // IE
|
"enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30103", // IE
|
||||||
"enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30303", // Parity
|
"enode://6332792c4a00e3e4ee0926ed89e0d27ef985424d97b6a45bf0f23e51f0dcb5e66b875777506458aea7af6f9e4ffb69f43f3778ee73c81ed9d34c51c4b16b0b0f@52.232.243.152:30103", // Parity
|
||||||
"enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30303", // @gpip
|
"enode://94c15d1b9e2fe7ce56e458b9a3b672ef11894ddedd0c6f247e0f1d3487f52b66208fb4aeb8179fce6e3a749ea93ed147c37976d67af557508d199d9594c35f09@192.81.208.223:30103", // @gpip
|
||||||
}
|
}
|
||||||
|
|
||||||
// RinkebyBootnodes are the enode URLs of the P2P bootstrap nodes running on the
|
// RinkebyBootnodes are the enode URLs of the P2P bootstrap nodes running on the
|
||||||
// Rinkeby test network.
|
// Rinkeby test network.
|
||||||
var RinkebyBootnodes = []string{
|
var RinkebyBootnodes = []string{
|
||||||
"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303", // IE
|
"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30103", // IE
|
||||||
"enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303", // INFURA
|
"enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30103", // INFURA
|
||||||
"enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30303", // AKASHA
|
"enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30103", // AKASHA
|
||||||
}
|
}
|
||||||
|
|
||||||
// DiscoveryV5Bootnodes are the enode URLs of the P2P bootstrap nodes for the
|
// DiscoveryV5Bootnodes are the enode URLs of the P2P bootstrap nodes for the
|
||||||
// experimental RLPx v5 topic-discovery network.
|
// experimental RLPx v5 topic-discovery network.
|
||||||
var DiscoveryV5Bootnodes = []string{
|
var DiscoveryV5Bootnodes = []string{
|
||||||
"enode://06051a5573c81934c9554ef2898eb13b33a34b94cf36b202b69fde139ca17a85051979867720d4bdae4323d4943ddf9aeeb6643633aa656e0be843659795007a@35.177.226.168:30303",
|
"enode://06051a5573c81934c9554ef2898eb13b33a34b94cf36b202b69fde139ca17a85051979867720d4bdae4323d4943ddf9aeeb6643633aa656e0be843659795007a@35.177.226.168:30103",
|
||||||
"enode://0cc5f5ffb5d9098c8b8c62325f3797f56509bff942704687b6530992ac706e2cb946b90a34f1f19548cd3c7baccbcaea354531e5983c7d1bc0dee16ce4b6440b@40.118.3.223:30304",
|
"enode://0cc5f5ffb5d9098c8b8c62325f3797f56509bff942704687b6530992ac706e2cb946b90a34f1f19548cd3c7baccbcaea354531e5983c7d1bc0dee16ce4b6440b@40.118.3.223:30104"
|
||||||
"enode://1c7a64d76c0334b0418c004af2f67c50e36a3be60b5e4790bdac0439d21603469a85fad36f2473c9a80eb043ae60936df905fa28f1ff614c3e5dc34f15dcd2dc@40.118.3.223:30306",
|
|
||||||
"enode://85c85d7143ae8bb96924f2b54f1b3e70d8c4d367af305325d30a61385a432f247d2c75c45c6b4a60335060d072d7f5b35dd1d4c45f76941f62a4f83b6e75daaf@40.118.3.223:30307",
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -531,7 +531,7 @@ var decodeTests = []decodeTest{
|
||||||
{input: "817F", ptr: new(*uint), error: "rlp: non-canonical size information for uint"},
|
{input: "817F", ptr: new(*uint), error: "rlp: non-canonical size information for uint"},
|
||||||
{input: "8180", ptr: new(*uint), value: uintp(0x80)},
|
{input: "8180", ptr: new(*uint), value: uintp(0x80)},
|
||||||
{input: "C109", ptr: new(*[]uint), value: &[]uint{9}},
|
{input: "C109", ptr: new(*[]uint), value: &[]uint{9}},
|
||||||
{input: "C58403030303", ptr: new(*[][]byte), value: &[][]byte{{3, 3, 3, 3}}},
|
{input: "C58403010303", ptr: new(*[][]byte), value: &[][]byte{{3, 3, 3, 3}}},
|
||||||
|
|
||||||
// check that input position is advanced also for empty values.
|
// check that input position is advanced also for empty values.
|
||||||
{input: "C3808005", ptr: new([]*uint), value: []*uint{uintp(0), uintp(0), uintp(5)}},
|
{input: "C3808005", ptr: new([]*uint), value: []*uint{uintp(0), uintp(0), uintp(5)}},
|
||||||
|
|
@ -551,7 +551,7 @@ var decodeTests = []decodeTest{
|
||||||
|
|
||||||
// fuzzer crashes
|
// fuzzer crashes
|
||||||
{
|
{
|
||||||
input: "c330f9c030f93030ce3030303030303030bd303030303030",
|
input: "c330f9c030f93030ce3010303010303030bd301030301030",
|
||||||
ptr: new(interface{}),
|
ptr: new(interface{}),
|
||||||
error: "rlp: element is larger than containing list",
|
error: "rlp: element is larger than containing list",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ func TestCountValues(t *testing.T) {
|
||||||
{"C0", 1, nil},
|
{"C0", 1, nil},
|
||||||
{"01 02 03", 3, nil},
|
{"01 02 03", 3, nil},
|
||||||
{"01 C406070809 02", 3, nil},
|
{"01 C406070809 02", 3, nil},
|
||||||
{"820101 820202 8403030303 04", 4, nil},
|
{"820101 820202 8403010303 04", 4, nil},
|
||||||
|
|
||||||
// size errors
|
// size errors
|
||||||
{"8142", 0, ErrCanonSize},
|
{"8142", 0, ErrCanonSize},
|
||||||
|
|
|
||||||
2
vendor/github.com/mattn/go-colorable/colorable_windows.go
generated
vendored
2
vendor/github.com/mattn/go-colorable/colorable_windows.go
generated
vendored
|
|
@ -338,7 +338,7 @@ var color256 = map[int]int{
|
||||||
233: 0x121212,
|
233: 0x121212,
|
||||||
234: 0x1c1c1c,
|
234: 0x1c1c1c,
|
||||||
235: 0x262626,
|
235: 0x262626,
|
||||||
236: 0x303030,
|
236: 0x301030,
|
||||||
237: 0x3a3a3a,
|
237: 0x3a3a3a,
|
||||||
238: 0x444444,
|
238: 0x444444,
|
||||||
239: 0x4e4e4e,
|
239: 0x4e4e4e,
|
||||||
|
|
|
||||||
2
vendor/golang.org/x/text/encoding/japanese/tables.go
generated
vendored
2
vendor/golang.org/x/text/encoding/japanese/tables.go
generated
vendored
|
|
@ -20107,7 +20107,7 @@ var encode0 = [...]uint16{
|
||||||
30296 - 19968: jis0208<<14 | 0x40<<7 | 0x55,
|
30296 - 19968: jis0208<<14 | 0x40<<7 | 0x55,
|
||||||
30297 - 19968: jis0212<<14 | 0x2D<<7 | 0x0B,
|
30297 - 19968: jis0212<<14 | 0x2D<<7 | 0x0B,
|
||||||
30300 - 19968: jis0208<<14 | 0x40<<7 | 0x54,
|
30300 - 19968: jis0208<<14 | 0x40<<7 | 0x54,
|
||||||
30303 - 19968: jis0212<<14 | 0x2D<<7 | 0x0C,
|
30103 - 19968: jis0212<<14 | 0x2D<<7 | 0x0C,
|
||||||
30305 - 19968: jis0208<<14 | 0x40<<7 | 0x56,
|
30305 - 19968: jis0208<<14 | 0x40<<7 | 0x56,
|
||||||
30306 - 19968: jis0208<<14 | 0x40<<7 | 0x57,
|
30306 - 19968: jis0208<<14 | 0x40<<7 | 0x57,
|
||||||
30308 - 19968: jis0212<<14 | 0x2D<<7 | 0x0D,
|
30308 - 19968: jis0212<<14 | 0x2D<<7 | 0x0D,
|
||||||
|
|
|
||||||
2
vendor/gopkg.in/olebedev/go-duktape.v3/duktape.c
generated
vendored
2
vendor/gopkg.in/olebedev/go-duktape.v3/duktape.c
generated
vendored
|
|
@ -90853,7 +90853,7 @@ const duk_uint16_t duk_unicode_re_canon_lookup[65536] = {
|
||||||
30263,30264,30265,30266,30267,30268,30269,30270,30271,30272,30273,30274,
|
30263,30264,30265,30266,30267,30268,30269,30270,30271,30272,30273,30274,
|
||||||
30275,30276,30277,30278,30279,30280,30281,30282,30283,30284,30285,30286,
|
30275,30276,30277,30278,30279,30280,30281,30282,30283,30284,30285,30286,
|
||||||
30287,30288,30289,30290,30291,30292,30293,30294,30295,30296,30297,30298,
|
30287,30288,30289,30290,30291,30292,30293,30294,30295,30296,30297,30298,
|
||||||
30299,30300,30301,30302,30303,30304,30305,30306,30307,30308,30309,30310,
|
30299,30300,30301,30302,30103,30304,30305,30306,30307,30308,30309,30310,
|
||||||
30311,30312,30313,30314,30315,30316,30317,30318,30319,30320,30321,30322,
|
30311,30312,30313,30314,30315,30316,30317,30318,30319,30320,30321,30322,
|
||||||
30323,30324,30325,30326,30327,30328,30329,30330,30331,30332,30333,30334,
|
30323,30324,30325,30326,30327,30328,30329,30330,30331,30332,30333,30334,
|
||||||
30335,30336,30337,30338,30339,30340,30341,30342,30343,30344,30345,30346,
|
30335,30336,30337,30338,30339,30340,30341,30342,30343,30344,30345,30346,
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ func TestSimulation(t *testing.T) {
|
||||||
func initialize(t *testing.T) {
|
func initialize(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
ip := net.IPv4(127, 0, 0, 1)
|
ip := net.IPv4(127, 0, 0, 1)
|
||||||
port0 := 30303
|
port0 := 30103
|
||||||
|
|
||||||
for i := 0; i < NumNodes; i++ {
|
for i := 0; i < NumNodes; i++ {
|
||||||
var node TestNode
|
var node TestNode
|
||||||
|
|
@ -129,7 +129,7 @@ func initialize(t *testing.T) {
|
||||||
t.Fatalf("failed convert the key: %s.", keys[i])
|
t.Fatalf("failed convert the key: %s.", keys[i])
|
||||||
}
|
}
|
||||||
port := port0 + i
|
port := port0 + i
|
||||||
addr := fmt.Sprintf(":%d", port) // e.g. ":30303"
|
addr := fmt.Sprintf(":%d", port) // e.g. ":30103"
|
||||||
name := common.MakeName("whisper-go", "2.0")
|
name := common.MakeName("whisper-go", "2.0")
|
||||||
var peers []*discover.Node
|
var peers []*discover.Node
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ func initialize(t *testing.T) {
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
ip := net.IPv4(127, 0, 0, 1)
|
ip := net.IPv4(127, 0, 0, 1)
|
||||||
port0 := 30303
|
port0 := 30103
|
||||||
|
|
||||||
for i := 0; i < NumNodes; i++ {
|
for i := 0; i < NumNodes; i++ {
|
||||||
var node TestNode
|
var node TestNode
|
||||||
|
|
@ -191,7 +191,7 @@ func initialize(t *testing.T) {
|
||||||
t.Fatalf("failed convert the key: %s.", keys[i])
|
t.Fatalf("failed convert the key: %s.", keys[i])
|
||||||
}
|
}
|
||||||
port := port0 + i
|
port := port0 + i
|
||||||
addr := fmt.Sprintf(":%d", port) // e.g. ":30303"
|
addr := fmt.Sprintf(":%d", port) // e.g. ":30103"
|
||||||
name := common.MakeName("whisper-go", "2.0")
|
name := common.MakeName("whisper-go", "2.0")
|
||||||
var peers []*discover.Node
|
var peers []*discover.Node
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue