db: save and restore accepted payments.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-09-06 13:47:33 +09:30
parent 79b5663db7
commit ab125f709b
6 changed files with 159 additions and 3 deletions

View File

@@ -10,8 +10,15 @@ struct payment {
u64 msatoshis;
struct rval r;
struct sha256 rhash;
bool complete;
};
/* From database */
void payment_add(struct lightningd_state *dstate,
const struct rval *r,
u64 msatoshis,
bool complete);
struct payment *find_payment(struct lightningd_state *dstate,
const struct sha256 *rhash);