mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/devp2p: use TTL constants in the CloudFlare deployer
This commit is contained in:
parent
c3d62eeb74
commit
91b9f5d36a
1 changed files with 2 additions and 2 deletions
|
|
@ -130,9 +130,9 @@ func (c *cloudflareClient) uploadRecords(name string, records map[string]string)
|
||||||
if !exists {
|
if !exists {
|
||||||
// Entry is unknown, push a new one to Cloudflare.
|
// Entry is unknown, push a new one to Cloudflare.
|
||||||
log.Info(fmt.Sprintf("Creating %s = %q", path, val))
|
log.Info(fmt.Sprintf("Creating %s = %q", path, val))
|
||||||
ttl := 1
|
ttl := rootTTL
|
||||||
if path != name {
|
if path != name {
|
||||||
ttl = 2147483647 // Max TTL permitted by Cloudflare
|
ttl = treeNodeTTL // Max TTL permitted by Cloudflare
|
||||||
}
|
}
|
||||||
_, err = c.CreateDNSRecord(c.zoneID, cloudflare.DNSRecord{Type: "TXT", Name: path, Content: val, TTL: ttl})
|
_, err = c.CreateDNSRecord(c.zoneID, cloudflare.DNSRecord{Type: "TXT", Name: path, Content: val, TTL: ttl})
|
||||||
} else if old.Content != val {
|
} else if old.Content != val {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue