-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Suggested Peers Includes Savings By Volume * Rebalance attempts will no longer be submitted when (your fee * max cost) < peer fee * Fixes an edge case in the channels data when uptime of a channel is 0 and fee rates never get set * View keysends page * Autopilot mode
- Loading branch information
1 parent
cc00ec2
commit 03fe7b4
Showing
14 changed files
with
270 additions
and
36 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,42 @@ | ||
# Generated by Django 3.2.7 on 2022-01-06 10:26 | ||
|
||
from django.db import migrations, models | ||
|
||
def update_cost_to(apps, schedma_editor): | ||
payments = apps.get_model('gui', 'payments') | ||
hops = apps.get_model('gui', 'paymenthops') | ||
for payment in payments.objects.filter(status=2).iterator(): | ||
cost_to = 0 | ||
for hop in hops.objects.filter(payment_hash=payment.payment_hash).order_by('step'): | ||
hop.cost_to = round(cost_to, 3) | ||
hop.save() | ||
cost_to += hop.fee | ||
|
||
def revert_cost_to(apps, schedma_editor): | ||
pass | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gui', '0015_invoices_index'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='channels', | ||
name='num_updates', | ||
field=models.IntegerField(default=0), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='paymenthops', | ||
name='cost_to', | ||
field=models.FloatField(default=0), | ||
), | ||
migrations.RunPython(update_cost_to, revert_cost_to), | ||
migrations.AlterField( | ||
model_name='paymenthops', | ||
name='cost_to', | ||
field=models.FloatField(), | ||
), | ||
] |
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-01-06 20:37 | ||
|
||
from django.db import migrations, models | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('gui', '0016_auto_20220106_1026'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Autopilot', | ||
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.IntegerField()), | ||
('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
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,35 @@ | ||
{% extends "base.html" %} | ||
{% block content %} | ||
{% load humanize %} | ||
{% if autopilot %} | ||
<div class="w3-container w3-padding-small"> | ||
<h2>Autopilot 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 autopilot %} | ||
<tr> | ||
<td>{{ log.timestamp|naturaltime }}</a></td> | ||
<td>{{ log.chan_id }}</a></td> | ||
<td>{{ log.peer_alias }}</td> | ||
<td>{{ log.setting }}</td> | ||
<td>{{ log.old_value }}</td> | ||
<td>{{ log.new_value }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
{% endif %} | ||
{% if not autopilot %} | ||
<div class="w3-container w3-padding-small"> | ||
<center><h1>No autopilot logs to see here yet!</h1></center> | ||
<center><h6>Experimental. Advanced users may activate via api.</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{% extends "base.html" %} | ||
{% block content %} | ||
{% load humanize %} | ||
{% if keysends %} | ||
<div class="w3-container w3-padding-small"> | ||
<h2>Received Keysends</h2> | ||
<table class="w3-table-all w3-centered w3-hoverable"> | ||
<tr> | ||
<th>Settle Date</th> | ||
<th>Channel In Alias</th> | ||
<th>Amount</th> | ||
<th>Message</th> | ||
</tr> | ||
{% for keysend in keysends %} | ||
<tr> | ||
<td title="{{ keysend.r_hash }}">{{ keysend.settle_date|naturaltime }}</td> | ||
<td>{{ keysend.chan_in_alias }}</td> | ||
<td>{{ keysend.amt_paid|intcomma }}</td> | ||
<td>{{ keysend.message }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
{% endif %} | ||
{% if not keysends %} | ||
<div class="w3-container w3-padding-small"> | ||
<center><h1>You dont have any keysend messages here yet!</h1></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.