SPV support & add internal HSD node #4

Merged
nathanwoodburn merged 9 commits from feat/internal_hsd into main 2025-08-29 13:04:31 +10:00
3 changed files with 10 additions and 4 deletions
Showing only changes of commit 23e714fad8 - Show all commits

Binary file not shown.

12
main.py
View File

@@ -1148,15 +1148,20 @@ def settings():
if success == None:
success = ""
if not os.path.exists(".git"):
return render_template("settings.html", account=account,
hsd_version=account_module.hsdVersion(False),
error=error,success=success,version="Error",internal=account_module.HSD_INTERNAL_NODE)
error=error,success=success,version="Error",
internal=account_module.HSD_INTERNAL_NODE,
spv=account_module.isSPV())
info = gitinfo.get_git_info()
if not info:
return render_template("settings.html", account=account,
hsd_version=account_module.hsdVersion(False),
error=error,success=success,version="Error",internal=account_module.HSD_INTERNAL_NODE)
error=error,success=success,version="Error",
internal=account_module.HSD_INTERNAL_NODE,
spv=account_module.isSPV())
branch = info['refs']
if branch != "main":
@@ -1171,7 +1176,8 @@ def settings():
version += ' (New version available)'
return render_template("settings.html", account=account,
hsd_version=account_module.hsdVersion(False),
error=error,success=success,version=version,internal=account_module.HSD_INTERNAL_NODE)
error=error,success=success,version=version,internal=account_module.HSD_INTERNAL_NODE,
spv=account_module.isSPV())
@app.route('/settings/<action>')
def settings_action(action):

View File

@@ -68,7 +68,7 @@
<h3 class="mb-1" style="text-align: center;color: rgb(0,255,0);">{{success}}</h3>
<div class="card">
<div class="card-body">
<h4 class="card-title">Node Settings</h4><small>HSD Version: v{{hsd_version}}</small>
<h4 class="card-title">Node Settings</h4><small>HSD Version: v{{hsd_version}}&nbsp; Type: {% if internal %} Internal {% else %} Remote {% endif %} ({% if spv %}SPV{% else %}Full Node{% endif %})</small>
<h6 class="text-muted mb-2 card-subtitle">Settings that affect all wallets</h6><ul class="list-group">
<li class="list-group-item">
<div><a class="btn btn-primary stick-right" role="button" href="/settings/rescan">Rescan</a>