Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit a7914c9

Browse files
author
Wu Yu Wei
authored
Merge pull request #83 from jkrvivian/remove_redundant_function
Serializer function cleanup
2 parents 600fb01 + f05042b commit a7914c9

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

serializer/serializer.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,31 +71,6 @@ int ta_hash243_queue_to_json_array(hash243_queue_t queue,
7171
return 0;
7272
}
7373

74-
int ta_json_array_to_hash243_queue(cJSON const* const obj,
75-
char const* const obj_name,
76-
hash243_queue_t* queue) {
77-
retcode_t ret_code = RC_OK;
78-
flex_trit_t hash[FLEX_TRIT_SIZE_243] = {};
79-
cJSON* json_item = cJSON_GetObjectItemCaseSensitive(obj, obj_name);
80-
if (cJSON_IsArray(json_item)) {
81-
cJSON* current_obj = NULL;
82-
cJSON_ArrayForEach(current_obj, json_item) {
83-
if (current_obj->valuestring != NULL) {
84-
flex_trits_from_trytes(hash, NUM_TRITS_HASH,
85-
(const tryte_t*)current_obj->valuestring,
86-
NUM_TRYTES_HASH, NUM_TRYTES_HASH);
87-
ret_code = hash243_queue_push(queue, hash);
88-
if (ret_code) {
89-
return -1;
90-
}
91-
}
92-
}
93-
} else {
94-
return -1;
95-
}
96-
return 0;
97-
}
98-
9974
int iota_transaction_to_json_object(iota_transaction_t const* const txn,
10075
cJSON** txn_json) {
10176
if (txn == NULL) {

0 commit comments

Comments
 (0)