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
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
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
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