mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-12 01:24:23 +01:00
timers: wrap all calls in transactions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
01361ab21b
commit
7586f3ed54
@@ -309,8 +309,11 @@ int main(int argc, char *argv[])
|
||||
if (v == ld)
|
||||
break;
|
||||
|
||||
if (expired)
|
||||
if (expired) {
|
||||
db_begin_transaction(ld->wallet->db);
|
||||
timer_expired(ld, expired);
|
||||
db_commit_transaction(ld->wallet->db);
|
||||
}
|
||||
}
|
||||
|
||||
shutdown_subdaemons(ld);
|
||||
|
||||
@@ -7,9 +7,18 @@ int unused_main(int argc, char *argv[]);
|
||||
/* Generated stub for crashlog_activate */
|
||||
void crashlog_activate(const char *argv0 UNNEEDED, struct log *log UNNEEDED)
|
||||
{ fprintf(stderr, "crashlog_activate called!\n"); abort(); }
|
||||
/* Generated stub for db_begin_transaction */
|
||||
bool db_begin_transaction(struct db *db UNNEEDED)
|
||||
{ fprintf(stderr, "db_begin_transaction called!\n"); abort(); }
|
||||
/* Generated stub for db_commit_transaction */
|
||||
bool db_commit_transaction(struct db *db UNNEEDED)
|
||||
{ fprintf(stderr, "db_commit_transaction called!\n"); abort(); }
|
||||
/* Generated stub for debug_poll */
|
||||
int debug_poll(struct pollfd *fds UNNEEDED, nfds_t nfds UNNEEDED, int timeout UNNEEDED)
|
||||
{ fprintf(stderr, "debug_poll called!\n"); abort(); }
|
||||
/* Generated stub for fatal */
|
||||
void fatal(const char *fmt UNNEEDED, ...)
|
||||
{ fprintf(stderr, "fatal called!\n"); abort(); }
|
||||
/* Generated stub for gossip_init */
|
||||
void gossip_init(struct lightningd *ld UNNEEDED)
|
||||
{ fprintf(stderr, "gossip_init called!\n"); abort(); }
|
||||
|
||||
Reference in New Issue
Block a user