global variables rename
@@ -1042,8 +1042,8 @@ static void *work_thread(void *arg)
pthread_t th;
#if USE_ORPHAN_HASHTABLE == 1
- orphan_hashtable = (struct orphan_block **)calloc(sizeof(struct orphan_block *), ORPHAN_HASH_SIZE);
- if(orphan_hashtable != NULL)
+ g_orphan_hashtable = (struct orphan_block **)calloc(sizeof(struct orphan_block *), ORPHAN_HASH_SIZE);
+ if(g_orphan_hashtable != NULL)
g_xdag_extstats.use_orphan_hashtable = 1;
#endif
@@ -1874,18 +1874,11 @@ void add_orphan_hashtable(struct block_internal* nodeBlock)
}
}
-<<<<<<< HEAD
-void clean_orphan_hashtable(){
+void clean_orphan_hashtable()
+{
for(struct orphan_block *obt=g_orphan_first, *obt_back = NULL; obt != NULL; obt_back = obt, obt=obt->next, free(obt_back));
memset(g_orphan_hashtable, 0, sizeof(struct orphan_block *)*ORPHAN_HASH_SIZE);
g_orphan_first = g_orphan_last = NULL;
-=======
-void clean_orphan_hashtable()
-{
- for(struct orphan_block *obt=orphan_first, *obt_back = NULL; obt != NULL; obt_back = obt, obt=obt->next, free(obt_back));
- memset(orphan_hashtable, 0, sizeof(struct orphan_block *)*ORPHAN_HASH_SIZE);
- orphan_first = orphan_last = NULL;
->>>>>>> 1d79d1101334f9037269bf1c9bdc4a2b67664fd2
}
void xdag_list_orphan_blocks(int count, FILE *out)
