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

Commit 8d0947e

Browse files
authored
Merge pull request #634 from HowJMay/fix_typo
cleanup: Fix typos
2 parents 46d4460 + 99a90e1 commit 8d0947e

24 files changed

+66
-66
lines changed

accelerator/cli_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static struct ta_cli_argument_s {
8888
{"proxy_passthrough", no_argument, NULL, PROXY_API, "Pass proxy API directly to IRI without processing"},
8989
{"health_track_period", no_argument, NULL, HEALTH_TRACK_PERIOD,
9090
"The period for checking IRI host connection status"},
91-
{"no-gtta", no_argument, NULL, NO_GTTA, "Disable getTransactionToConfirm (gTTA) when sending transacation"},
91+
{"no-gtta", no_argument, NULL, NO_GTTA, "Disable getTransactionToConfirm (gTTA) when sending transaction"},
9292
{"buffer_list", required_argument, NULL, BUFFER_LIST, "Set the value of `buffer_list_name`"},
9393
{"done_list", required_argument, NULL, DONE_LIST, "Set the value of `done_list_name`"},
9494
{"quiet", no_argument, NULL, QUIET, "Disable logger"},

accelerator/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ typedef struct ta_cache_s {
104104

105105
/** struct type of accelerator core */
106106
typedef struct ta_core_s {
107-
ta_config_t ta_conf; /**< accelerator configiuration structure */
108-
ta_cache_t cache; /**< redis configiuration structure */
107+
ta_config_t ta_conf; /**< accelerator configuration structure */
108+
ta_cache_t cache; /**< redis configuration structure */
109109
iota_config_t iota_conf; /**< iota configuration structure */
110110
iota_client_service_t iota_service; /**< iota connection structure */
111111
#ifdef DB_ENABLE

accelerator/core/apis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ status_t api_send_transfer(const ta_core_t* const core, const iota_client_servic
381381
#ifdef DB_ENABLE
382382
ret = db_insert_tx_into_identity(&core->db_service, res->hash, PENDING_TXN, res->uuid_string);
383383
if (ret != SC_OK) {
384-
ta_log_error("fail to insert new pending transaction for reattachement\n");
384+
ta_log_error("fail to insert new pending transaction for reattachment\n");
385385
goto done;
386386
}
387387
#endif

accelerator/core/core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ status_t ta_send_transfer(const ta_config_t* const info, const iota_config_t* co
202202
memcpy(transfer.tag, hash81_queue_peek(req->tag), FLEX_TRIT_SIZE_81);
203203
transfer_array_add(transfers, &transfer);
204204

205-
// TODO we may need args `remainder_address`, `inputs`, `timestampe` in the
205+
// TODO we may need args `remainder_address`, `inputs`, `timestamp` in the
206206
// future and declare `security` field in `iota_config_t`
207207
flex_trit_t seed[NUM_FLEX_TRITS_ADDRESS];
208208
flex_trits_from_trytes(seed, NUM_TRITS_HASH, (tryte_t const*)iconf->seed, NUM_TRYTES_HASH, NUM_TRYTES_HASH);
@@ -321,7 +321,7 @@ status_t ta_find_transaction_objects(const iota_client_service_t* const service,
321321
cache_value[NUM_TRYTES_SERIALIZED_TRANSACTION] = '\0';
322322

323323
// append transaction object which is already cached to transaction_array_t
324-
// if not, append uncached to request object of `iota_client_find_transaction_objectss`
324+
// if not, append uncached to request object of `iota_client_find_transaction_objects`
325325
hash243_queue_entry_t* q_iter = NULL;
326326
CDL_FOREACH(req->hashes, q_iter) {
327327
flex_trits_to_trytes((tryte_t*)txn_hash, NUM_TRYTES_HASH, q_iter->hash, NUM_TRITS_HASH, NUM_TRITS_HASH);
@@ -499,7 +499,7 @@ status_t ta_get_bundles_by_addr(const iota_client_service_t* const service, tryt
499499
goto done;
500500
}
501501

502-
// In case the requested transction hashes is an empty one
502+
// In case the requested transaction hashes is an empty one
503503
if (hash243_queue_count(txn_res->hashes) > 0) {
504504
hash243_queue_copy(&obj_req->hashes, txn_res->hashes, hash243_queue_count(txn_res->hashes));
505505
} else {
@@ -582,7 +582,7 @@ status_t ta_get_iri_status(const iota_client_service_t* const service) {
582582
return ret;
583583
}
584584

585-
status_t ta_update_iri_conneciton(ta_config_t* const ta_conf, iota_client_service_t* const service) {
585+
status_t ta_update_iri_connection(ta_config_t* const ta_conf, iota_client_service_t* const service) {
586586
status_t ret = SC_OK;
587587
for (int i = 0; i < MAX_IRI_LIST_ELEMENTS && ta_conf->iota_host_list[i]; i++) {
588588
// update new IRI host
@@ -689,7 +689,7 @@ status_t broadcast_buffered_txn(const ta_core_t* const core) {
689689
}
690690

691691
// TODO Now we assume every time we call `cache_get()`, we would get a transaction object. However, in the future,
692-
// the returned result may be a bunlde.
692+
// the returned result may be a bundle.
693693
int trytes_array_len = 0;
694694
ret = cache_list_size(uuid, &trytes_array_len);
695695
if (ret) {

accelerator/core/core.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ status_t ta_send_bundle(const ta_config_t* const info, const iota_config_t* cons
215215
*
216216
* @param[in] service IRI node end point service
217217
* @param[in] addr searched address in tryte_t
218-
* @param[in] bundle_array a bundle array object that will contain the MAM transacitons
218+
* @param[in] bundle_array a bundle array object that will contain the MAM transactions
219219
*
220220
* @return
221221
* - SC_OK on success
@@ -229,8 +229,8 @@ status_t ta_get_bundles_by_addr(const iota_client_service_t* const service, tryt
229229
*
230230
* We would check out the connection status with IRI core API getNodeInfo. At the first step, we would check whether
231231
* tangle-accelerator can connect to the IRI host which is assigned in iota_client_service_t object. If the
232-
* tangl-accelerator connects to the IRI host, the next step we are going to check out whether the connected IRI has
233-
* synchronized to the latest milestone. The mentioned two errors above would trigger tangle-acclerator connect to
232+
* tangle-accelerator connects to the IRI host, the next step we are going to check out whether the connected IRI has
233+
* synchronized to the latest milestone. The mentioned two errors above would trigger tangle-accelerator connect to
234234
* another IRI host on IRI priority host list.
235235
*
236236
* @param[in] service IRI node end point service
@@ -244,7 +244,7 @@ status_t ta_get_iri_status(const iota_client_service_t* const service);
244244
/**
245245
* @brief Update the binding IRI host to another valid host on priority list
246246
*
247-
* ta_update_iri_conneciton would check the connection status of all the IRI host on priority list iteratively. Once it
247+
* ta_update_iri_connection would check the connection status of all the IRI host on priority list iteratively. Once it
248248
* connect to one of the IRI host on the priority list, it would return SC_OK.
249249
*
250250
* @param ta_conf[in] Tangle-accelerator configuration variables
@@ -254,7 +254,7 @@ status_t ta_get_iri_status(const iota_client_service_t* const service);
254254
* - SC_OK on success
255255
* - non-zero on error
256256
*/
257-
status_t ta_update_iri_conneciton(ta_config_t* const ta_conf, iota_client_service_t* const service);
257+
status_t ta_update_iri_connection(ta_config_t* const ta_conf, iota_client_service_t* const service);
258258

259259
/**
260260
* @brief Push failed transactions in raw trytes into transaction buffer
@@ -264,7 +264,7 @@ status_t ta_update_iri_conneciton(ta_config_t* const ta_conf, iota_client_servic
264264
* be popped from the buffer.
265265
*
266266
* @param cache[in] Redis configuration variables
267-
* @param raw_txn_flex_trit_array[in] Raw transction trytes array in flex_trit_t type
267+
* @param raw_txn_flex_trit_array[in] Raw transcation trytes array in flex_trit_t type
268268
* @param uuid[out] Returned UUID for fetching transaction status and information
269269
*
270270
* @return
@@ -276,7 +276,7 @@ status_t push_txn_to_buffer(const ta_cache_t* const cache, hash8019_array_p raw_
276276
/**
277277
* @brief Broadcast transactions in transaction buffer
278278
*
279-
* Failed transactions would be stored in transaciton buffer. Once tangle-accelerator retrieve the connetion with
279+
* Failed transactions would be stored in transaction buffer. Once tangle-accelerator retrieve the connetion with
280280
* Tangle, then tangle-accelerator will start to broadcast these failed transaction trytes.
281281
*
282282
* @param core[in] Pointer to Tangle-accelerator core configuration structure

accelerator/core/mam_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static status_t ta_mam_written_msg_to_bundle(const iota_client_service_t *const
335335
}
336336

337337
if (!msg_id_exist(tag_array, transaction_tag((iota_transaction_t *)utarray_front(*bundle)))) {
338-
ta_log_debug("%s\n", "Found avialable msg_id");
338+
ta_log_debug("%s\n", "Found available msg_id");
339339
break;
340340
}
341341

accelerator/core/response/ta_send_mam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ status_t send_mam_res_set_bundle_hash(ta_send_mam_res_t* res, const tryte_t* bun
7979
status_t send_mam_res_set_channel_id(ta_send_mam_res_t* res, const tryte_t* channel_id);
8080

8181
/**
82-
* @brief Set the msgl_id field of send_mam_res object.
82+
* @brief Set the msg_id field of send_mam_res object.
8383
*
8484
* @param[in] res ta_send_mam_res_t struct object
8585
* @param[in] msg_id Message id decoded in trytes string

accelerator/core/serializer/serializer.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void serializer_logger_init();
5858
int serializer_logger_release();
5959

6060
/**
61-
* @brief Serialze tangle accelerator info into JSON
61+
* @brief Serialize tangle accelerator info into JSON
6262
*
6363
* @param[out] obj Tangle-accelerator info in JSON
6464
* @param[in] ta_config Tangle-accelerator configuration variables
@@ -75,7 +75,7 @@ status_t ta_get_info_serialize(char** obj, ta_config_t* const ta_config, iota_co
7575

7676
#ifdef DB_ENABLE
7777
/**
78-
* @brief Serialze identity info into JSON
78+
* @brief Serialize identity info into JSON
7979
*
8080
* @param[out] obj db identity info in JSON
8181
* @param[in] id_obj pointer to db_identity_t;
@@ -87,7 +87,7 @@ status_t db_identity_serialize(char** obj, db_identity_t* id_obj);
8787
#endif
8888

8989
/**
90-
* @brief Serialze type of ta_generate_address_res_t to JSON string
90+
* @brief Serialize type of ta_generate_address_res_t to JSON string
9191
*
9292
* @param[out] obj Address hash in JSON
9393
* @param[in] res Response data in type of ta_generate_address_res_t
@@ -99,7 +99,7 @@ status_t db_identity_serialize(char** obj, db_identity_t* id_obj);
9999
status_t ta_generate_address_res_serialize(const ta_generate_address_res_t* const res, char** obj);
100100

101101
/**
102-
* @brief Serialze object `get_tips_res_t` into JSON
102+
* @brief Serialize object `get_tips_res_t` into JSON
103103
*
104104
* @param[in] res Result `get_tips_res_t` object with tips inside
105105
* @param[out] obj Output tips in JSON
@@ -111,7 +111,7 @@ status_t ta_generate_address_res_serialize(const ta_generate_address_res_t* cons
111111
status_t ta_get_tips_res_serialize(const get_tips_res_t* const res, char** obj);
112112

113113
/**
114-
* @brief Serialze the response of api_insert_identity()
114+
* @brief Serialize the response of api_insert_identity()
115115
*
116116
* @param[in] hash Response transaction hash
117117
* @param[in] uuid_string Response uuid string
@@ -136,7 +136,7 @@ status_t ta_insert_identity_res_serialize(const char* hash, const char* uuid_str
136136
status_t ta_send_transfer_req_deserialize(const char* const obj, ta_send_transfer_req_t* req);
137137

138138
/**
139-
* @brief Serialze the response of api_send_transfer()
139+
* @brief Serialize the response of api_send_transfer()
140140
*
141141
* @param[in] res Response data in type of ta_send_transfer_res_t
142142
* @param[out] obj Input values in JSON
@@ -161,7 +161,7 @@ status_t ta_send_transfer_res_serialize(ta_send_transfer_res_t* res, char** obj)
161161
status_t ta_send_trytes_req_deserialize(const char* const obj, hash8019_array_p out_trytes);
162162

163163
/**
164-
* @brief Serialze hash8019_array_p to JSON string
164+
* @brief Serialize hash8019_array_p to JSON string
165165
*
166166
* @param[in] trytes trytes array returned in type of hash8019_array_p
167167
* @param[out] obj output serialized JSON values
@@ -173,7 +173,7 @@ status_t ta_send_trytes_req_deserialize(const char* const obj, hash8019_array_p
173173
status_t ta_send_trytes_res_serialize(const hash8019_array_p trytes, char** obj);
174174

175175
/**
176-
* @brief Serialze response of api_transaction_object_single into JSON
176+
* @brief Serialize response of api_transaction_object_single into JSON
177177
*
178178
* @param[in] res Transaction object array, but we take only the first one
179179
* @param[out] obj Result of serialization in JSON format.
@@ -198,7 +198,7 @@ status_t ta_find_transaction_objects_req_deserialize(const char* const obj,
198198
ta_find_transaction_objects_req_t* const req);
199199

200200
/**
201-
* @brief Serialze type of ta_find_transaction_objects_res_t to JSON string
201+
* @brief Serialize type of ta_find_transaction_objects_res_t to JSON string
202202
*
203203
* @param[out] obj List of transaction object in JSON
204204
* @param[in] res Response data in type of ta_find_transaction_objects_res_t
@@ -210,7 +210,7 @@ status_t ta_find_transaction_objects_req_deserialize(const char* const obj,
210210
status_t ta_find_transaction_objects_res_serialize(const transaction_array_t* const res, char** obj);
211211

212212
/**
213-
* @brief Serialze type of ta_find_transactions_by_tag_res_t to JSON string
213+
* @brief Serialize type of ta_find_transactions_by_tag_res_t to JSON string
214214
*
215215
* @param[out] obj List of transaction hash in JSON
216216
* @param[in] res Response data in type of ta_find_transactions_by_tag_res_t
@@ -282,7 +282,7 @@ status_t send_mam_req_deserialize(const char* const obj, ta_send_mam_req_t* req)
282282
status_t send_mam_res_deserialize(const char* const obj, ta_send_mam_res_t* const res);
283283

284284
/**
285-
* @brief Serialze type of ta_send_mam_res_t to JSON string
285+
* @brief Serialize type of ta_send_mam_res_t to JSON string
286286
*
287287
* @param[out] obj send mam response object in JSON
288288
* @param[in] res Response data in type of ta_send_mam_res_t
@@ -358,7 +358,7 @@ status_t get_iri_status_milestone_deserialize(char const* const obj, int* const
358358
int* const latestSolidSubtangleMilestone);
359359

360360
/**
361-
* @brief Serialze the response of IRI connection status.
361+
* @brief Serialize the response of IRI connection status.
362362
*
363363
* @param[in] status Reponse status code
364364
* @param[out] obj Serialized API response
@@ -370,7 +370,7 @@ status_t get_iri_status_milestone_deserialize(char const* const obj, int* const
370370
status_t get_iri_status_res_serialize(const status_t status, char** obj);
371371

372372
/**
373-
* @brief Serialze the response of `fetch_txn_with_uuid()`.
373+
* @brief Serialize the response of `fetch_txn_with_uuid()`.
374374
*
375375
* @param[in] res ta_fetch_txn_with_uuid_res_t object
376376
* @param[out] obj Serialized API response

accelerator/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static void* health_track(void* arg) {
2626
status_t ret = ta_get_iri_status(&core->iota_service);
2727
if (ret == SC_CORE_IRI_UNSYNC || ret == SC_CCLIENT_FAILED_RESPONSE) {
2828
ta_log_error("IRI status error %d. Try to connect to another IRI host on priority list\n", ret);
29-
ret = ta_update_iri_conneciton(&core->ta_conf, &core->iota_service);
29+
ret = ta_update_iri_connection(&core->ta_conf, &core->iota_service);
3030
if (ret) {
3131
ta_log_error("Update IRI host failed: %d\n", ret);
3232
}

accelerator/mqtt_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
6565
}
6666

6767
// Initialize `mosq` and `cfg`
68-
// if we want to opertate this program under multi-threading, see https://github.com/eclipse/mosquitto/issues/450
68+
// if we want to operate this program under multi-threading, see https://github.com/eclipse/mosquitto/issues/450
6969
ret = duplex_config_init(&mosq, &cfg);
7070
if (ret != SC_OK) {
7171
ta_log_error("%d\n", ret);

0 commit comments

Comments
 (0)