Comments (4)
I think they're better than nothing though (after my fix below). I was able to quickly identify which remote nodes made more sats by forwarding than my node. Unless people actively manage their fees they don't change often so I think it's a reasonable assumption to make these days.
The exact fix is below (you have to adapt it to LND, I'm running this on C-Lightning):
for fe in fwd_events:
cin = fe["in_channel"]
cout = fe["out_channel"]
ts = int(fe["resolved_time"])
fee = int(fe["fee"] / 1000)
amount_in = int(fe["in_msatoshi"] / 1000)
if cin in self.channels:
self.channels[cin].last_forward = max(
ts, self.channels[cin].last_forward
)
self.channels[cin].remote_fees += int((self.channels[cin].remote_base_fee + (self.channels[cin].remote_fee_rate * amount_in / 1000)) / 1000)
if cout in self.channels:
self.channels[cout].last_forward = max(
ts, self.channels[cout].last_forward
)
self.channels[cout].local_fees += fee
from suez.
The above is just an estimate that assumes fixed remote fees for the given forwarding period. To get the exact number we'd have to track remote fee changes.
from suez.
I am thinking of dropping remote fees completely, because these are not accurate. Also I am not that sure whether these should be an important factor whether to keep/close/rebalance the channel.
from suez.
Fixed in 8f07c6f
Thanks!
from suez.
Related Issues (20)
- ModuleNotFoundError: No module named 'dataclasses' HOT 8
- edge not foud HOT 2
- ZeroDivisionError when running without channels HOT 1
- connecting to remote node? HOT 6
- TypeError: unsupported format string passed to NoneType.__format__ HOT 2
- ZeroDivisionError while node syncing HOT 3
- Latest c-lightning no longer has last_tx_fee, but does have last_tx_fee_msat
- Confirming: is it dangerous to interrupt the script (e.g., via CTRL+C)? HOT 2
- Remote Node / Umbrel HOT 3
- Display in Min & Max HTLCs HOT 4
- Use RPC instead of lncli HOT 3
- No module named 'virtualenv.seed.via_app_data' HOT 4
- Parallel channels for Core Ligthning are not displayed HOT 2
- Version for Terminal Web Scores HOT 1
- Terminal Web v3 HOT 1
- Inaccurate local fees calculation HOT 2
- Add arguments to show only public or only private channels HOT 6
- corelightning + suez HOT 18
- CLN - Command "setchannelfee" is deprecated HOT 3
- Add lightning-network as a topic to this repository HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suez.