@@ -37,7 +37,6 @@ import (
3737 "github.com/XinFinOrg/XDPoSChain/log"
3838 "github.com/XinFinOrg/XDPoSChain/node"
3939 "github.com/XinFinOrg/XDPoSChain/params"
40- whisper "github.com/XinFinOrg/XDPoSChain/whisper/whisperv6"
4140 "github.com/naoina/toml"
4241)
4342
4746 Name : "dumpconfig" ,
4847 Usage : "Show configuration values" ,
4948 ArgsUsage : "" ,
50- Flags : append (append ( nodeFlags , rpcFlags ... ), whisperFlags ... ),
49+ Flags : append (nodeFlags , rpcFlags ... ),
5150 Category : "MISCELLANEOUS COMMANDS" ,
5251 Description : `The dumpconfig command shows configuration values.` ,
5352 }
@@ -91,7 +90,6 @@ type Bootnodes struct {
9190
9291type XDCConfig struct {
9392 Eth ethconfig.Config
94- Shh whisper.Config
9593 Node node.Config
9694 Ethstats ethstatsConfig
9795 XDCX XDCx.Config
@@ -130,7 +128,6 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, XDCConfig) {
130128 // Load defaults.
131129 cfg := XDCConfig {
132130 Eth : ethconfig .Defaults ,
133- Shh : whisper .DefaultConfig ,
134131 XDCX : XDCx .DefaultConfig ,
135132 Node : defaultNodeConfig (),
136133 StakeEnable : true ,
@@ -212,7 +209,6 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, XDCConfig) {
212209 cfg .Ethstats .URL = ctx .GlobalString (utils .EthStatsURLFlag .Name )
213210 }
214211
215- utils .SetShhConfig (ctx , stack , & cfg .Shh )
216212 utils .SetXDCXConfig (ctx , & cfg .XDCX , cfg .Node .DataDir )
217213 return stack , cfg
218214}
@@ -230,16 +226,6 @@ func applyValues(values []string, params *[]string) {
230226
231227}
232228
233- // enableWhisper returns true in case one of the whisper flags is set.
234- func enableWhisper (ctx * cli.Context ) bool {
235- for _ , flag := range whisperFlags {
236- if ctx .GlobalIsSet (flag .GetName ()) {
237- return true
238- }
239- }
240- return false
241- }
242-
243229func makeFullNode (ctx * cli.Context ) (* node.Node , XDCConfig ) {
244230 stack , cfg := makeConfigNode (ctx )
245231
@@ -248,19 +234,6 @@ func makeFullNode(ctx *cli.Context) (*node.Node, XDCConfig) {
248234 utils .RegisterXDCXService (stack , & cfg .XDCX )
249235 utils .RegisterEthService (stack , & cfg .Eth )
250236
251- // Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode
252- shhEnabled := enableWhisper (ctx )
253- shhAutoEnabled := ! ctx .GlobalIsSet (utils .WhisperEnabledFlag .Name ) && ctx .GlobalIsSet (utils .DeveloperFlag .Name )
254- if shhEnabled || shhAutoEnabled {
255- if ctx .GlobalIsSet (utils .WhisperMaxMessageSizeFlag .Name ) {
256- cfg .Shh .MaxMessageSize = uint32 (ctx .Int (utils .WhisperMaxMessageSizeFlag .Name ))
257- }
258- if ctx .GlobalIsSet (utils .WhisperMinPOWFlag .Name ) {
259- cfg .Shh .MinimumAcceptedPOW = ctx .Float64 (utils .WhisperMinPOWFlag .Name )
260- }
261- utils .RegisterShhService (stack , & cfg .Shh )
262- }
263-
264237 // Add the Ethereum Stats daemon if requested.
265238 if cfg .Ethstats .URL != "" {
266239 utils .RegisterEthStatsService (stack , cfg .Ethstats .URL )
0 commit comments