Check routing on LND

From lightningwiki.net
Revision as of 06:59, 17 January 2019 by MiltonPusser (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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