mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-12 22:33:37 +08:00
add is_zonefile_data_current(), which takes a raw zone file (unlike is_zonefile_current())
This commit is contained in:
@@ -1628,7 +1628,7 @@ def has_zonefile_hash(fqu, proxy=None):
|
||||
|
||||
def is_zonefile_current(fqu, zonefile_json, proxy=None):
|
||||
"""
|
||||
Return True if hash(@zonefile_json) published on blockchain
|
||||
Return True if hash(@zonefile_json) is published on the blockchain
|
||||
"""
|
||||
|
||||
proxy = get_default_proxy() if proxy is None else proxy
|
||||
@@ -1638,6 +1638,18 @@ def is_zonefile_current(fqu, zonefile_json, proxy=None):
|
||||
return is_zonefile_hash_current(fqu, zonefile_hash, proxy=proxy)
|
||||
|
||||
|
||||
def is_zonefile_data_current(fqu, zonefile_data, proxy=None):
|
||||
"""
|
||||
Return True if hash(@zonefile_data) is published on the blockchain
|
||||
"""
|
||||
|
||||
proxy = get_default_proxy() if proxy is None else proxy
|
||||
|
||||
zonefile_hash = storage.get_zonefile_data_hash(zonefile_data)
|
||||
|
||||
return is_zonefile_hash_current(fqu, zonefile_hash, proxy=proxy)
|
||||
|
||||
|
||||
def is_zonefile_hash_current(fqu, zonefile_hash, proxy=None):
|
||||
"""
|
||||
Return True if hash(@zonefile_json) published on blockchain
|
||||
|
||||
Reference in New Issue
Block a user