Difference between revisions of "Check routing on LND"

From lightningwiki.net
Jump to navigation Jump to search
 
Line 1: Line 1:
As a good Lightning citizen, you want to route lots of payments!
= Forwarding history =
To check if your LND node has forwarded events, do:
To check if your LND node has forwarded events, do:
<pre>lncli fwdinghistory --max_events 100000 --start_time=$( date +%s --date='00:00' ) --end_time=$(date +%s)</pre>
<pre>lncli fwdinghistory --max_events 100000 --start_time=$( date +%s --date='00:00' ) --end_time=$(date +%s)</pre>

Latest revision as of 06:59, 17 January 2019

As a good Lightning citizen, you want to route lots of payments!

Forwarding history

To check if your LND node has forwarded events, do:

lncli fwdinghistory --max_events 100000 --start_time=$( date +%s --date='00:00' ) --end_time=$(date +%s)

It will show you the events since midnight of the current day.

Increase routing

You could change your fees or do better Node Management.

Nightly email

Below cronjob will send a summary email every night: /opt/mail.sh:

( lncli walletbalance; lncli channelbalance;  lncli getinfo; lncli fwdinghistory --max_events 100000 --start_time=$( date +%s --date='1 day ago' ) --end_time=$(date +%s) | grep chan | sort | uniq -c | sort -rn | head; lncli fwdinghistory --max_events 100000 --start_time=$( date +%s --date='1 day ago' ) --end_time=$(date +%s) ) | mail -s "Lighting stats, [ $( lncli fwdinghistory --max_events 100000 --start_time=$( date +%s --date='1 day ago' ) --end_time=$(date +%s) | grep last_offset | egrep -o '[0-9]*' ) ] payments" root 

Root crontab:

0 0 * * * /opt/mail.sh