mirror of
https://github.com/mynodebtc/mynode.git
synced 2025-01-11 11:29:27 +00:00
Show LND Channel DB size on Lightning page
This commit is contained in:
parent
11a43b18c9
commit
4ce5f4f535
|
@ -447,6 +447,17 @@ def get_lnd_channel_backup_file():
|
|||
def lnd_channel_backup_exists():
|
||||
return os.path.isfile( get_lnd_channel_backup_file() )
|
||||
|
||||
def lnd_get_channel_db_size():
|
||||
path = "mainnet"
|
||||
if is_testnet_enabled():
|
||||
path = "testnet"
|
||||
size = "???"
|
||||
try:
|
||||
size = subprocess.check_output("ls -lsah /mnt/hdd/mynode/lnd/data/graph/"+path+"/channel.db | awk '{print $6}'", shell=True)
|
||||
except:
|
||||
size = "ERR"
|
||||
return size
|
||||
|
||||
def get_lnd_status():
|
||||
#if not lnd_wallet_exists():
|
||||
# return "Please create wallet..."
|
||||
|
|
|
@ -206,6 +206,7 @@ def page_lnd():
|
|||
"pubkey": pubkey,
|
||||
"uri": uri,
|
||||
"ip": ip,
|
||||
"channel_db_size": lnd_get_channel_db_size(),
|
||||
"watchtower_enabled": is_watchtower_enabled(),
|
||||
"lit_password": get_lnd_lit_password(),
|
||||
"lnd_deposit_address": lnd_deposit_address,
|
||||
|
|
|
@ -208,6 +208,10 @@
|
|||
<th>Num Peers</th>
|
||||
<td>{{num_peers}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>DB Size</th>
|
||||
<td>{{channel_db_size}}</td>
|
||||
</tr>
|
||||
{% if is_testnet_enabled %}
|
||||
<tr>
|
||||
<th>Network</th>
|
||||
|
|
Loading…
Reference in New Issue
Block a user