Add PulseChain to devp2p

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

View File

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

View File

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