db: make db_set_visible_state called from within transaction.

We want to do this atomically; this is the first step.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-11-09 08:04:25 +10:30
parent 8c5fae2b28
commit 6acb4953b1
3 changed files with 7 additions and 8 deletions

View File

@@ -7,7 +7,6 @@
void db_init(struct lightningd_state *dstate);
bool db_create_peer(struct peer *peer);
bool db_set_visible_state(struct peer *peer);
void db_start_transaction(struct peer *peer);
void db_abort_transaction(struct peer *peer);
@@ -44,6 +43,7 @@ bool db_remove_invoice(struct lightningd_state *dstate,
* which have to be inside transaction anyway. */
/* Must be inside transaction. */
void db_set_visible_state(struct peer *peer);
void db_set_anchor(struct peer *peer);
void db_new_htlc(struct peer *peer, const struct htlc *htlc);
void db_new_feechange(struct peer *peer, const struct feechange *feechange);