mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 11:31:02 +00:00
Add PulseChain to devp2p
This commit is contained in:
parent
47d73c02dd
commit
7d6be63969
@ -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.
|
// isSubdomain returns true if name is a subdomain of domain.
|
||||||
func isSubdomain(name, domain string) bool {
|
func isSubdomain(name, domain string) bool {
|
||||||
|
// Normalize strings for comparison
|
||||||
|
name = strings.ToLower(name)
|
||||||
|
domain = strings.ToLower(domain)
|
||||||
|
|
||||||
domain = strings.TrimSuffix(domain, ".")
|
domain = strings.TrimSuffix(domain, ".")
|
||||||
name = strings.TrimSuffix(name, ".")
|
name = strings.TrimSuffix(name, ".")
|
||||||
return strings.HasSuffix("."+name, "."+domain)
|
return strings.HasSuffix("."+name, "."+domain)
|
||||||
|
@ -230,6 +230,10 @@ func ethFilter(args []string) (nodeFilter, error) {
|
|||||||
switch args[0] {
|
switch args[0] {
|
||||||
case "mainnet":
|
case "mainnet":
|
||||||
filter = forkid.NewStaticFilter(params.MainnetChainConfig, core.DefaultGenesisBlock().ToBlock())
|
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":
|
case "goerli":
|
||||||
filter = forkid.NewStaticFilter(params.GoerliChainConfig, core.DefaultGoerliGenesisBlock().ToBlock())
|
filter = forkid.NewStaticFilter(params.GoerliChainConfig, core.DefaultGoerliGenesisBlock().ToBlock())
|
||||||
case "sepolia":
|
case "sepolia":
|
||||||
|
Loading…
Reference in New Issue
Block a user