]> pd.if.org Git - nbds/blobdiff - txn/txn.c
separate tests out into their own files
[nbds] / txn / txn.c
index 013388e78973f0e435d9bff4b13727ecec98c8e0..b0b6174359b05d896e68a81a7e675c565d6b8a26 100644 (file)
--- a/txn/txn.c
+++ b/txn/txn.c
@@ -29,7 +29,7 @@ typedef struct write_rec {
 struct txn {
     uint64_t rv;
     uint64_t wv;
-    hash_table_t *ht;
+    hashtable_t *ht;
     write_rec_t *writes;
     uint32_t writes_size;
     uint32_t writes_count;
@@ -50,7 +50,7 @@ update_rec_t *alloc_update_rec (void) {
     return u;
 }
 
-txn_t *txn_begin (txn_access_t access, txn_isolation_t isolation, hash_table_t *ht) {
+txn_t *txn_begin (txn_access_t access, txn_isolation_t isolation, hashtable_t *ht) {
     txn_t *txn = (txn_t *)nbd_malloc(sizeof(txn_t));
     memset(txn, 0, sizeof(txn_t));
     txn->access = access;
@@ -240,11 +240,3 @@ void txn_ht_put (txn_t *txn, const char *key, uint32_t key_len, int64_t value) {
     txn->writes[i].key = key;
     txn->writes[i].rec = update;
 }
-
-#ifdef MAKE_txn_test
-#include "runtime.h"
-int main (void) {
-    nbd_init();
-    return 0;
-}
-#endif//txn_test