tdb2: test: fix run-57-die-during-transaction.c to be more efficient.
[ccan] / ccan / tdb2 / test / run-missing-entries.c
index 9bc778771df0638d00b29f5e1f3a2ddfee294c6e..22d6ba4270af6b22277fc8aa2356b82039c19f41 100644 (file)
@@ -1,13 +1,5 @@
+#include "tdb2-source.h"
 /* Another test revealed that we lost an entry.  This reproduces it. */
-#include <ccan/tdb2/tdb.c>
-#include <ccan/tdb2/open.c>
-#include <ccan/tdb2/free.c>
-#include <ccan/tdb2/lock.c>
-#include <ccan/tdb2/io.c>
-#include <ccan/tdb2/hash.c>
-#include <ccan/tdb2/check.c>
-#include <ccan/tdb2/traverse.c>
-#include <ccan/tdb2/transaction.c>
 #include <ccan/tap/tap.h>
 #include "logging.h"
 
@@ -27,7 +19,7 @@ int main(int argc, char *argv[])
        struct tdb_data key = { (unsigned char *)&i, sizeof(i) };
        struct tdb_data data = { (unsigned char *)&i, sizeof(i) };
        union tdb_attribute hattr = { .hash = { .base = { TDB_ATTRIBUTE_HASH },
-                                               .hash_fn = failhash } };
+                                               .fn = failhash } };
 
        hattr.base.next = &tap_log_attr;
        plan_tests(1 + 2 * NUM_RECORDS + 1);