diff --git a/cmd/chain33/chain33.toml b/cmd/chain33/chain33.toml index c8ff4b1d66..91a395580b 100644 --- a/cmd/chain33/chain33.toml +++ b/cmd/chain33/chain33.toml @@ -126,7 +126,8 @@ httpApi=["eth","web3","personal","admin","net"] # websocket 绑定地址 wsAddr="localhost:8546" wsApi=["eth","web3","personal","admin","net"] - +# 自定义配置 web3_clientversion 版本 +web3CliVer="" [mempool] # mempool队列名称,可配,timeline,score,price name="timeline" diff --git a/rpc/ethrpc/rpc.go b/rpc/ethrpc/rpc.go index 6d621806f1..37abb78e73 100644 --- a/rpc/ethrpc/rpc.go +++ b/rpc/ethrpc/rpc.go @@ -55,7 +55,7 @@ type subConfig struct { HTTPAPI []string `json:"httpApi,omitempty"` //eth,admin,net,web3/personal WsAddr string `json:"wsAddr,omitempty"` WsAPI []string `json:"wsApi,omitempty"` //eth,admin,net,web3/personal - Web3CliVer string `json:"web3Cliver,omitempty"` + Web3CliVer string `json:"web3CliVer,omitempty"` } //ServerAPI ... diff --git a/rpc/ethrpc/web3/web3.go b/rpc/ethrpc/web3/web3.go index 35bba2d57a..858d0eb54a 100644 --- a/rpc/ethrpc/web3/web3.go +++ b/rpc/ethrpc/web3/web3.go @@ -36,7 +36,7 @@ func (w *web3Handler) Sha3(input string) (string, error) { //web3_clientVersion func (w *web3Handler) ClientVersion() (string, error) { var subcfg struct { - Web3CliVer string `json:"web3Cliver,omitempty"` + Web3CliVer string `json:"web3CliVer,omitempty"` } ctypes.MustDecode(w.cfg.GetSubConfig().RPC["eth"], &subcfg) diff --git a/types/defaultcfg.go b/types/defaultcfg.go index cf7d2bccd2..6bbdbdf689 100644 --- a/types/defaultcfg.go +++ b/types/defaultcfg.go @@ -93,7 +93,7 @@ jrpcFuncWhitelist=["*"] grpcFuncWhitelist=["*"] [rpc.sub.eth] enable=false -web3Cliver="Geth/v1.8.15-omnibus-255989da/linux-amd64/go1.10.1" +web3CliVer="Geth/v1.8.15-omnibus-255989da/linux-amd64/go1.10.1" [mempool] name="timeline"