From 270357ff1d70ed6193f84471eb4c88c651046a36 Mon Sep 17 00:00:00 2001 From: bretep <717695-bretep@users.noreply.gitlab.com> Date: Tue, 21 Mar 2023 11:04:02 -0700 Subject: [PATCH] Add PulseChain to devp2p --- cmd/devp2p/dns_route53.go | 4 ++++ cmd/devp2p/nodesetcmd.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cmd/devp2p/dns_route53.go b/cmd/devp2p/dns_route53.go index 400ab1b1c..e591c9465 100644 --- a/cmd/devp2p/dns_route53.go +++ b/cmd/devp2p/dns_route53.go @@ -405,6 +405,10 @@ func newTXTChange(action, name string, ttl int64, values ...string) types.Change // isSubdomain returns true if name is a subdomain of domain. func isSubdomain(name, domain string) bool { + // Normalize strings for comparison + name = strings.ToLower(name) + domain = strings.ToLower(domain) + domain = strings.TrimSuffix(domain, ".") name = strings.TrimSuffix(name, ".") return strings.HasSuffix("."+name, "."+domain) diff --git a/cmd/devp2p/nodesetcmd.go b/cmd/devp2p/nodesetcmd.go index 2faa2882e..3fc384910 100644 --- a/cmd/devp2p/nodesetcmd.go +++ b/cmd/devp2p/nodesetcmd.go @@ -229,6 +229,10 @@ func ethFilter(args []string) (nodeFilter, error) { switch args[0] { case "mainnet": filter = forkid.NewStaticFilter(params.MainnetChainConfig, params.MainnetGenesisHash) + case "PulseChain": + filter = forkid.NewStaticFilter(params.PulseChainConfig, params.MainnetGenesisHash) + case "PulseChainTestnet": + filter = forkid.NewStaticFilter(params.PulseChainTestnetConfig, params.MainnetGenesisHash) case "rinkeby": filter = forkid.NewStaticFilter(params.RinkebyChainConfig, params.RinkebyGenesisHash) case "goerli":