transaction logic is inside of DB function
This commit is contained in:
parent
88ff3e8bb5
commit
33f5242ac4
@ -153,14 +153,6 @@ main (int argc, char *const *argv)
|
||||
"Failed to initialize DB session\n");
|
||||
goto cleanup;
|
||||
}
|
||||
if (GNUNET_OK !=
|
||||
plugin->start (plugin->cls,
|
||||
session))
|
||||
{
|
||||
fprintf (stderr,
|
||||
"Failed to start transaction\n");
|
||||
goto cleanup;
|
||||
}
|
||||
expiration = GNUNET_TIME_relative_to_absolute (RESERVE_EXPIRATION);
|
||||
if (GNUNET_OK !=
|
||||
plugin->reserves_in_insert (plugin->cls,
|
||||
@ -174,14 +166,6 @@ main (int argc, char *const *argv)
|
||||
"Failed to update reserve.\n");
|
||||
goto cleanup;
|
||||
}
|
||||
if (GNUNET_OK !=
|
||||
plugin->commit (plugin->cls,
|
||||
session))
|
||||
{
|
||||
fprintf (stderr,
|
||||
"Failed to commit transaction\n");
|
||||
goto cleanup;
|
||||
}
|
||||
ret = 0;
|
||||
cleanup:
|
||||
if (NULL != plugin)
|
||||
|
Loading…
Reference in New Issue
Block a user