Commit Graph

6 Commits

Author SHA1 Message Date
ZmnSCPxj 59abc37258 invoices: Add expiration timer system.
Fixes: #502

Changes behavior of waitinvoice API!!
2018-02-05 08:52:42 +00:00
ZmnSCPxj 1e6747c28e wallet: Pass in timers object during construction.
In preparation for expiration.
2018-02-05 08:52:42 +00:00
Rusty Russell 2443d45b47 delinvoice: fixes.
Error code is inverted (which makes sense: who returns 'true' on
error?), and anyway there's a leak if we do error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-19 22:23:45 +00:00
ZmnSCPxj 7b6a16a3a6 invoices: Do not load `pay_index` if not PAID.
`pay_index` has no valid value if not PAID anyway, so
we should correctly leave it uninitialized.
Analysis via valgrind will catch incorrect use of
uninitialized fields.
If we load it with a dummy 0 value, then an
incorrect use of `pay_index` whan invoice is not
PAID will not get caught by valgrind.
2018-01-18 17:37:10 +01:00
ZmnSCPxj a88c73a41b invoices: Add `paid_timestamp` field.
Fixes: #615
2018-01-18 17:37:10 +01:00
ZmnSCPxj 93dc90990f invoices: Extensive reorganization of invoice system. 2018-01-16 13:03:54 +01:00