Browse Source

jsonrpc: wrap all calls in transaction.

ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
01361ab21b
  1. 2
      lightningd/jsonrpc.c

2
lightningd/jsonrpc.c

@ -506,7 +506,9 @@ static void parse_request(struct json_connection *jcon, const jsmntok_t tok[])
return; return;
} }
db_begin_transaction(jcon->ld->wallet->db);
cmd->dispatch(jcon->current, jcon->buffer, params); cmd->dispatch(jcon->current, jcon->buffer, params);
db_commit_transaction(jcon->ld->wallet->db);
} }
static struct io_plan *write_json(struct io_conn *conn, static struct io_plan *write_json(struct io_conn *conn,

Loading…
Cancel
Save