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>
8 years ago
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>
8 years ago
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>
8 years ago
Rusty Russell
68632e6020
Use "msatoshi" not "msatoshis" everywhere.
Including in JSON API.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
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>
8 years ago