Check routing on LND

From lightningwiki.net
Jump to: navigation, search

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

Forwarding history[edit]

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[edit]

You could change your fees or do better Node Management.

Nightly email[edit]

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