Add PulseChain to devp2p

This commit is contained in:
bretep 2023-03-21 11:04:02 -07:00 committed by Shane Bammel
parent 47d73c02dd
commit 7d6be63969
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -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":