Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendinvoiceless list received payments #14

Merged
merged 3 commits into from May 8, 2019

Conversation

Projects
None yet
3 participants
@m-schmoock
Copy link
Collaborator

commented May 3, 2019

This will add the command receivedinvoiceless which will
show the recent payments/donations being made to your node.

Usage

The plugin can be called like below. It will filter results by min_amount (default: 10sat).

lightning-cli receivedinvoiceless [min_amount]

Returns

lightning-cli receivedinvoiceless 
[
   {
      "amount_msat" : "999600msat",
      "amount_btc" : "0.00001000btc",
      "resolved_time" : 1556558261.481,
      "timestamp" : "2019-04-29 17:17:41 (UTC)"
   }
]

Limitations

The plugin currently does not use a database, so it can only assume fees did not change in the past. else will produce slightly false results.

@m-schmoock

This comment has been minimized.

Copy link
Collaborator Author

commented May 3, 2019

@gallizoltan @cdecker
What do you think about this?

@m-schmoock

This comment has been minimized.

Copy link
Collaborator Author

commented May 3, 2019

@gallizoltan where the 1000sat 2019-04-29 17:17:41 (UTC) to my mainnet node made by you? :D

@m-schmoock m-schmoock requested a review from cdecker May 3, 2019

@m-schmoock m-schmoock force-pushed the m-schmoock:invoiceless_received branch 3 times, most recently from cd51b21 to 54af5cc May 3, 2019

@m-schmoock

This comment has been minimized.

Copy link
Collaborator Author

commented May 3, 2019

The plugin checks against the channels fee settings. This seems why I have payments with tiny amount, as I used setchannelfees in the past. This is why I added the min_amount default 10sat filter.

@gallizoltan

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

@gallizoltan where the 1000sat 2019-04-29 17:17:41 (UTC) to my mainnet node made by you? :D

Yes, I was testing sendinvoiceless! 😃

This receivedinvoiceless conception looks good! I'll test and review the code soon.

@m-schmoock

This comment has been minimized.

Copy link
Collaborator Author

commented May 3, 2019

Question: Do we substract own fees when detecting a invoiceless payment or do we assume all fees paid via this method are the intended amount? I.e. my node (currently) says "amount_msat" : "999600msat" but Zoltán send a full 1000sat.

Note: Details, but if we do not substract own routing fees, it is impossible to send less than the routing fees as amount.

Edit: After consultation with Zoltán, we add the routing fees at the sender side to keep the fee model persistend and allow sub fee payments. I will update this PR...

@m-schmoock m-schmoock force-pushed the m-schmoock:invoiceless_received branch 4 times, most recently from bee1675 to 28ab776 May 5, 2019

@gallizoltan
Copy link
Contributor

left a comment

I've read and tested the code; it works and looks good! 😎

@m-schmoock m-schmoock requested review from cdecker and removed request for cdecker May 8, 2019

@cdecker
Copy link
Contributor

left a comment

Just one minor type and a reference to the official pay documentation would be nice, since they also explain the meaning of the arguments :-)

Show resolved Hide resolved sendinvoiceless/README.md Outdated

m-schmoock added some commits May 7, 2019

feat: sendinvoiceless list payments
This commit will add the cli command `receivedinvoiceless`
which will show you the deteceted payments made using this method.

@m-schmoock m-schmoock force-pushed the m-schmoock:invoiceless_received branch from 28ab776 to 6e3878b May 8, 2019

@m-schmoock m-schmoock requested a review from cdecker May 8, 2019

@m-schmoock

This comment has been minimized.

Copy link
Collaborator Author

commented May 8, 2019

Thx for your participation, i think we are ready here. I let the @cdecker the honor of merging :D

Issues have been resolved

@m-schmoock m-schmoock removed the request for review from cdecker May 8, 2019

@cdecker

cdecker approved these changes May 8, 2019

Copy link
Contributor

left a comment

ACK 6e3878b

@cdecker cdecker merged commit b515dbe into lightningd:master May 8, 2019

@m-schmoock m-schmoock deleted the m-schmoock:invoiceless_received branch May 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.