#include <ccan/tdb/error.c>
#include <ccan/tdb/open.c>
#include <ccan/tdb/check.c>
+#include <ccan/tdb/hash.c>
#include <ccan/tap/tap.h>
#include <stdlib.h>
#include <stdbool.h>
#include <err.h>
+#include "logging.h"
+
int main(int argc, char *argv[])
{
struct tdb_context *tdb;
key.dsize = strlen("hi");
key.dptr = (void *)"hi";
- tdb = tdb_open("run-nested-transactions.tdb", 1024, TDB_CLEAR_IF_FIRST,
- O_CREAT|O_TRUNC|O_RDWR, 0600);
+ tdb = tdb_open_ex("run-nested-transactions.tdb",
+ 1024, TDB_CLEAR_IF_FIRST,
+ O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL);
ok1(tdb);
/* No nesting by default. */
free(data.dptr);
tdb_close(tdb);
- tdb = tdb_open("run-nested-transactions.tdb", 1024, TDB_ALLOW_NESTING, O_RDWR, 0);
+ tdb = tdb_open_ex("run-nested-transactions.tdb",
+ 1024, TDB_ALLOW_NESTING, O_RDWR, 0, &taplogctx, NULL);
ok1(tdb);
ok1(tdb_transaction_start(tdb) == 0);