fix: Check if blocksSinceExpired to get expired domains
All checks were successful
Build Docker / Build Images (map[dockerfile:Dockerfile.hsd tag_suffix:-hsd target:hsd]) (push) Successful in 2m56s
Build Docker / Build Images (map[dockerfile:Dockerfile tag_suffix: target:default]) (push) Successful in 3m4s
Tests and Linting / Tests-Linting (3.11) (push) Successful in 3m6s
Tests and Linting / Tests-Linting (3.10) (push) Successful in 3m24s
Tests and Linting / Tests-Linting (3.13) (push) Successful in 3m24s

This commit is contained in:
2025-09-18 16:35:34 +10:00
parent 608933c228
commit c4cd2bc443

View File

@@ -486,9 +486,14 @@ def getDomains(account, own: bool = True, expired: bool = SHOW_EXPIRED):
# Remove any expired domains
domains = []
for domain in info:
if 'stats' in domain:
if 'stats' in domain and domain['stats'] is not None:
if 'daysUntilExpire' in domain['stats']:
if domain['stats']['daysUntilExpire'] < 0:
logger.debug(f"Excluding expired domain: {domain['name']} due to daysUntilExpire")
continue
if 'blocksSinceExpired' in domain['stats']:
if domain['stats']['blocksSinceExpired'] > 0:
logger.debug(f"Excluding expired domain: {domain['name']} due to blocksSinceExpired")
continue
domains.append(domain)
@@ -1571,9 +1576,9 @@ def getMempoolBids():
# region settingsAPIs
def rescan():
def rescan(height:int = 0):
try:
response = hsw.walletRescan(0)
response = hsw.walletRescan(height)
if 'success' in response and response['success'] is False:
return {
"error": {