Skip to content

Commit

Permalink
whisper: remove whisper
Browse files Browse the repository at this point in the history
  • Loading branch information
JukLee0ira committed Oct 23, 2024
1 parent 22779d1 commit 3c29bee
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import (
"github.com/XinFinOrg/XDPoSChain/p2p/netutil"
"github.com/XinFinOrg/XDPoSChain/params"
"github.com/XinFinOrg/XDPoSChain/rpc"
whisper "github.com/XinFinOrg/XDPoSChain/whisper/whisperv6"
gopsutil "github.com/shirou/gopsutil/mem"
"gopkg.in/urfave/cli.v1"
)
Expand Down Expand Up @@ -587,12 +586,12 @@ var (
WhisperMaxMessageSizeFlag = cli.IntFlag{
Name: "shh.maxmessagesize",
Usage: "Max message size accepted",
Value: int(whisper.DefaultMaxMessageSize),
Value: 1024 * 1024,
}
WhisperMinPOWFlag = cli.Float64Flag{
Name: "shh.pow",
Usage: "Minimum POW accepted",
Value: whisper.DefaultMinimumPoW,
Value: 0.2,
}
XDCXDataDirFlag = DirectoryFlag{
Name: "XDCx.datadir",
Expand Down Expand Up @@ -1126,12 +1125,11 @@ func checkExclusive(ctx *cli.Context, args ...interface{}) {
}

// SetShhConfig applies shh-related command line flags to the config.
func SetShhConfig(ctx *cli.Context, stack *node.Node, cfg *whisper.Config) {
if ctx.GlobalIsSet(WhisperMaxMessageSizeFlag.Name) {
cfg.MaxMessageSize = uint32(ctx.GlobalUint(WhisperMaxMessageSizeFlag.Name))
}
if ctx.GlobalIsSet(WhisperMinPOWFlag.Name) {
cfg.MinimumAcceptedPOW = ctx.GlobalFloat64(WhisperMinPOWFlag.Name)
func SetShhConfig(ctx *cli.Context, stack *node.Node) {
if ctx.GlobalIsSet(WhisperEnabledFlag.Name) ||
ctx.GlobalIsSet(WhisperMaxMessageSizeFlag.Name) ||
ctx.GlobalIsSet(WhisperMinPOWFlag.Name) {
log.Warn("Whisper support has been deprecated and the code has been moved to github.com/ethereum/whisper")
}
}

Expand Down

0 comments on commit 3c29bee

Please sign in to comment.