Created
February 19, 2020 18:00
-
-
Save RCasatta/7dc471405a9d21b7f6cbc0e70c354d21 to your computer and use it in GitHub Desktop.
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
FEES_COLLECTED=$(lightning-cli getinfo | jq '.msatoshi_fees_collected / 1000') | |
AVERAGE_FORWARDED=$(lightning-cli listforwards | jq '.forwards[] | select (.status == "settled") | .in_msatoshi' | jq -s 'add / length / 1000') | |
PAYMENTS_FORWARDED=$(lightning-cli listforwards | jq '.forwards[] | select (.status == "settled") | .in_msatoshi' | jq -s 'length') | |
echo "Payments forwarded: $PAYMENTS_FORWARDED" | |
echo "Average payment forwarded: $AVERAGE_FORWARDED satoshi" | |
echo "Fees collected: $FEES_COLLECTED satoshi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment