-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6381abf
commit 479a563
Showing
21 changed files
with
577 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.2.7 on 2022-03-11 23:31 | ||
|
||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gui', '0022_auto_20220227_2235'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='channels', | ||
name='fees_updated', | ||
field=models.DateTimeField(default=django.utils.timezone.now), | ||
), | ||
migrations.AddField( | ||
model_name='channels', | ||
name='auto_fees', | ||
field=models.BooleanField(default=False), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 3.2.7 on 2022-03-16 17:12 | ||
|
||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gui', '0023_repair_closures'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Autofees', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('timestamp', models.DateTimeField(default=django.utils.timezone.now)), | ||
('chan_id', models.CharField(max_length=20)), | ||
('peer_alias', models.CharField(max_length=32)), | ||
('setting', models.CharField(max_length=20)), | ||
('old_value', models.IntegerField()), | ||
('new_value', models.IntegerField()), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Generated by Django 3.2.7 on 2022-03-23 14:59 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gui', '0024_autofees'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='Resolutions', | ||
), | ||
migrations.DeleteModel( | ||
name='Closures', | ||
), | ||
migrations.CreateModel( | ||
name='Resolutions', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('chan_id', models.CharField(max_length=20)), | ||
('resolution_type', models.IntegerField()), | ||
('outcome', models.IntegerField()), | ||
('outpoint_tx', models.CharField(max_length=64)), | ||
('outpoint_index', models.IntegerField()), | ||
('amount_sat', models.BigIntegerField()), | ||
('sweep_txid', models.CharField(max_length=64)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Closures', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('chan_id', models.CharField(max_length=20)), | ||
('funding_txid', models.CharField(max_length=64)), | ||
('funding_index', models.IntegerField()), | ||
('closing_tx', models.CharField(max_length=64)), | ||
('remote_pubkey', models.CharField(max_length=66)), | ||
('capacity', models.BigIntegerField()), | ||
('close_height', models.IntegerField()), | ||
('settled_balance', models.BigIntegerField()), | ||
('time_locked_balance', models.BigIntegerField()), | ||
('close_type', models.IntegerField()), | ||
('open_initiator', models.IntegerField()), | ||
('close_initiator', models.IntegerField()), | ||
('resolution_count', models.IntegerField()), | ||
], | ||
options={ | ||
'unique_together': {('funding_txid', 'funding_index')}, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% extends "base.html" %} | ||
{% block title %} {{ block.super }} - Autofees{% endblock %} | ||
{% block content %} | ||
{% load humanize %} | ||
{% if autofees %} | ||
<div class="w3-container w3-padding-small"> | ||
<h2>Autofees Logs</h2> | ||
<table class="w3-table-all w3-centered w3-hoverable"> | ||
<tr> | ||
<th>Timestamp</th> | ||
<th>Channel ID</th> | ||
<th>Peer Alias</th> | ||
<th>Setting</th> | ||
<th>Old Value</th> | ||
<th>New Value</th> | ||
</tr> | ||
{% for log in autofees %} | ||
<tr> | ||
<td title="{{ log.timestamp }}">{{ log.timestamp|naturaltime }}</td> | ||
<td><a href="/channel?={{ log.chan_id }}" target="_blank">{{ log.chan_id }}</a></td> | ||
<td>{% if log.peer_alias == '' %}---{% else %}{{ log.peer_alias }}{% endif %}</td> | ||
<td>{{ log.setting }}</td> | ||
<td>{{ log.old_value }}</td> | ||
<td>{{ log.new_value }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
{% endif %} | ||
{% if not autofees %} | ||
<div class="w3-container w3-padding-small"> | ||
<center><h1>No autofees logs to see here yet!</h1></center> | ||
<center><h6>Experimental. This will allow LNDg to automatically act upon the suggestions found <a href="/fees" target="_blank">here</a>.</h6></center> | ||
</div> | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.