Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
whqwjb
go-ethereum
提交
beabf95a
G
go-ethereum
项目概览
whqwjb
/
go-ethereum
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
go-ethereum
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
beabf95a
编写于
7月 09, 2020
作者:
R
rene
提交者:
GitHub
7月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cmd/geth, cmd/puppeth: replace deprecated rpc and ws flags in tests and docs (#21317)
上级
6ccce090
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
16 deletion
+16
-16
README.md
README.md
+10
-10
cmd/geth/consolecmd_test.go
cmd/geth/consolecmd_test.go
+2
-2
cmd/geth/les_test.go
cmd/geth/les_test.go
+1
-1
cmd/puppeth/module_explorer.go
cmd/puppeth/module_explorer.go
+2
-2
cmd/puppeth/module_wallet.go
cmd/puppeth/module_wallet.go
+1
-1
未找到文件。
README.md
浏览文件 @
beabf95a
...
...
@@ -162,7 +162,7 @@ above command does. It will also create a persistent volume in your home direct
saving your blockchain as well as map the default ports. There is also an
`alpine`
tag
available for a slim version of the image.
Do not forget
`--
rpc
addr 0.0.0.0`
, if you want to access RPC from other containers
Do not forget
`--
http.
addr 0.0.0.0`
, if you want to access RPC from other containers
and/or hosts. By default,
`geth`
binds to the local interface and RPC endpoints is not
accessible from the outside.
...
...
@@ -182,16 +182,16 @@ you'd expect.
HTTP based JSON-RPC API options:
*
`--
rpc
`
Enable the HTTP-RPC server
*
`--
rpc
addr`
HTTP-RPC server listening interface (default:
`localhost`
)
*
`--
rpc
port`
HTTP-RPC server listening port (default:
`8545`
)
*
`--
rpc
api`
API's offered over the HTTP-RPC interface (default:
`eth,net,web3`
)
*
`--
rpc
corsdomain`
Comma separated list of domains from which to accept cross origin requests (browser enforced)
*
`--
http
`
Enable the HTTP-RPC server
*
`--
http.
addr`
HTTP-RPC server listening interface (default:
`localhost`
)
*
`--
http.
port`
HTTP-RPC server listening port (default:
`8545`
)
*
`--
http.
api`
API's offered over the HTTP-RPC interface (default:
`eth,net,web3`
)
*
`--
http.
corsdomain`
Comma separated list of domains from which to accept cross origin requests (browser enforced)
*
`--ws`
Enable the WS-RPC server
*
`--wsaddr`
WS-RPC server listening interface (default:
`localhost`
)
*
`--wsport`
WS-RPC server listening port (default:
`8546`
)
*
`--wsapi`
API's offered over the WS-RPC interface (default:
`eth,net,web3`
)
*
`--wsorigins`
Origins from which to accept websockets requests
*
`--ws
.
addr`
WS-RPC server listening interface (default:
`localhost`
)
*
`--ws
.
port`
WS-RPC server listening port (default:
`8546`
)
*
`--ws
.
api`
API's offered over the WS-RPC interface (default:
`eth,net,web3`
)
*
`--ws
.
origins`
Origins from which to accept websockets requests
*
`--ipcdisable`
Disable the IPC-RPC server
*
`--ipcapi`
API's offered over the IPC-RPC interface (default:
`admin,debug,eth,miner,net,personal,shh,txpool,web3`
)
*
`--ipcpath`
Filename for IPC socket/pipe within the datadir (explicit paths escape it)
...
...
cmd/geth/consolecmd_test.go
浏览文件 @
beabf95a
...
...
@@ -104,7 +104,7 @@ func TestHTTPAttachWelcome(t *testing.T) {
port
:=
strconv
.
Itoa
(
trulyRandInt
(
1024
,
65536
))
// Yeah, sometimes this will fail, sorry :P
geth
:=
runGeth
(
t
,
"--port"
,
"0"
,
"--maxpeers"
,
"0"
,
"--nodiscover"
,
"--nat"
,
"none"
,
"--etherbase"
,
coinbase
,
"--
rpc"
,
"--rpc
port"
,
port
)
"--etherbase"
,
coinbase
,
"--
http"
,
"--http.
port"
,
port
)
defer
func
()
{
geth
.
Interrupt
()
geth
.
ExpectExit
()
...
...
@@ -121,7 +121,7 @@ func TestWSAttachWelcome(t *testing.T) {
geth
:=
runGeth
(
t
,
"--port"
,
"0"
,
"--maxpeers"
,
"0"
,
"--nodiscover"
,
"--nat"
,
"none"
,
"--etherbase"
,
coinbase
,
"--ws"
,
"--wsport"
,
port
)
"--etherbase"
,
coinbase
,
"--ws"
,
"--ws
.
port"
,
port
)
defer
func
()
{
geth
.
Interrupt
()
geth
.
ExpectExit
()
...
...
cmd/geth/les_test.go
浏览文件 @
beabf95a
...
...
@@ -97,7 +97,7 @@ func (g *gethrpc) waitSynced() {
func
startGethWithRpc
(
t
*
testing
.
T
,
name
string
,
args
...
string
)
*
gethrpc
{
g
:=
&
gethrpc
{
name
:
name
}
args
=
append
([]
string
{
"--networkid=42"
,
"--port=0"
,
"--nousb"
,
"--
rpc"
,
"--rpcport=0"
,
"--rpc
api=admin,eth,les"
},
args
...
)
args
=
append
([]
string
{
"--networkid=42"
,
"--port=0"
,
"--nousb"
,
"--
http"
,
"--http.port=0"
,
"--http.
api=admin,eth,les"
},
args
...
)
t
.
Logf
(
"Starting %v with rpc: %v"
,
name
,
args
)
g
.
geth
=
runGeth
(
t
,
args
...
)
// wait before we can attach to it. TODO: probe for it properly
...
...
cmd/puppeth/module_explorer.go
浏览文件 @
beabf95a
...
...
@@ -35,8 +35,8 @@ FROM puppeth/blockscout:latest
ADD genesis.json /genesis.json
RUN \
echo 'geth --cache 512 init /genesis.json' > explorer.sh && \
echo $'geth --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --
rpc --rpcapi "net,web3,eth,shh,debug" --rpccorsdomain "*" --rpcvhosts "*" --ws --ws
origins "*" --exitwhensynced' >> explorer.sh && \
echo $'exec geth --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --
rpc --rpcapi "net,web3,eth,shh,debug" --rpccorsdomain "*" --rpcvhosts "*" --ws --ws
origins "*" &' >> explorer.sh && \
echo $'geth --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --
http --http.api "net,web3,eth,shh,debug" --http.corsdomain "*" --http.vhosts "*" --ws --ws.
origins "*" --exitwhensynced' >> explorer.sh && \
echo $'exec geth --networkid {{.NetworkID}} --syncmode "full" --gcmode "archive" --port {{.EthPort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --
http --http.api "net,web3,eth,shh,debug" --http.corsdomain "*" --http.vhosts "*" --ws --ws.
origins "*" &' >> explorer.sh && \
echo '/usr/local/bin/docker-entrypoint.sh postgres &' >> explorer.sh && \
echo 'sleep 5' >> explorer.sh && \
echo 'mix do ecto.drop --force, ecto.create, ecto.migrate' >> explorer.sh && \
...
...
cmd/puppeth/module_wallet.go
浏览文件 @
beabf95a
...
...
@@ -37,7 +37,7 @@ ADD genesis.json /genesis.json
RUN \
echo 'node server.js &' > wallet.sh && \
echo 'geth --cache 512 init /genesis.json' >> wallet.sh && \
echo $'exec geth --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --
rpc --rpcaddr=0.0.0.0 --rpccorsdomain "*" --rpc
vhosts "*"' >> wallet.sh
echo $'exec geth --networkid {{.NetworkID}} --port {{.NodePort}} --bootnodes {{.Bootnodes}} --ethstats \'{{.Ethstats}}\' --cache=512 --
http --http.addr=0.0.0.0 --http.corsdomain "*" --http.
vhosts "*"' >> wallet.sh
RUN \
sed -i 's/PuppethNetworkID/{{.NetworkID}}/g' dist/js/etherwallet-master.js && \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录