Rusty Russell
ca4d03aa2a
lightningd_state: move invoices into separate structure.
...
It's all maintained by invoice.c, so make it private to that.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-01-04 13:18:47 +10:30
Rusty Russell
f5c00deec7
Remove trailing whitespace from source.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-11 09:32:04 +10:30
Rusty Russell
1d57fa60b8
invoice: print duplicate r value even if we choose it.
...
This shouldn't happen, but if our RNG is busted and get a duplicate,
r would be NULL.
(scan-build found this)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-11-01 21:34:58 +10:30
Rusty Russell
48da22ab4b
Merge remote-tracking branch 'origin/pr/56'
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-10-25 11:23:34 +10:30
Christian Decker
3dd2e0c2b3
jsonrpc: Correctly handle numeric invoice labels
...
`listinvoice` was not handling numeric labels correctly if they are not
passed in as JSON strings (which was the behavior of
`lightning-cli`). So now we accept both string labels as well as numeric
labels.
2016-10-23 18:52:08 +02:00
Christian Decker
50807db7aa
jsonrpc: Fixed listinvoice
returning broken JSON
...
Closes #48 .
2016-10-23 10:57:29 +02:00
Rusty Russell
5bcc9047b0
db: save error, return it when we commit transaction.
...
This saves a lot of error handling, and puts it in the place we care about.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:49 +09:30
Rusty Russell
c83fb1a2dd
waitinvoice: RPC call for processing incoming invoices.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:49 +09:30
Rusty Russell
27715f7732
invoice: order by when they were paid.
...
We need some ordering to deliver them to the JSON "waitinvoice" command;
we use a counter where 0 means "unpaid".
We keep two lists now, one for unpaid and one for paid invoices.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:49 +09:30
Rusty Russell
0761c12381
delinvoice: routine to remove an unpaid invoice.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:49 +09:30
Rusty Russell
f6a0ea0b66
listinvoices: RPC command to show one or all invoices.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:49 +09:30
Rusty Russell
68632e6020
Use "msatoshi" not "msatoshis" everywhere.
...
Including in JSON API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:49 +09:30
Rusty Russell
060ff29b45
Rename payment to invoice.
...
And rename JSON's accept-payment command to invoice.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-09-06 16:47:49 +09:30