From 7d6be639691d321b530368e13910a22d26522970 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 21a32f941..f93704e3c 100644 --- a/cmd/devp2p/dns_route53.go +++ b/cmd/devp2p/dns_route53.go @@ -411,6 +411,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 6fbc185ad..4b73987c9 100644 --- a/cmd/devp2p/nodesetcmd.go +++ b/cmd/devp2p/nodesetcmd.go @@ -230,6 +230,10 @@ func ethFilter(args []string) (nodeFilter, error) { switch args[0] { case "mainnet": filter = forkid.NewStaticFilter(params.MainnetChainConfig, core.DefaultGenesisBlock().ToBlock()) + case "PulseChain": + filter = forkid.NewStaticFilter(params.PulseChainConfig, core.DefaultGenesisBlock().ToBlock()) + case "PulseChainTestnet": + filter = forkid.NewStaticFilter(params.PulseChainTestnetConfig, core.DefaultGenesisBlock().ToBlock()) case "goerli": filter = forkid.NewStaticFilter(params.GoerliChainConfig, core.DefaultGoerliGenesisBlock().ToBlock()) case "sepolia":