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

Commit 70928dd

Browse files
author
Yu Wei Wu
committed
fix(core): Return error if transaction not found
Return error code if find_transaction_object can't find any result since default response would be null trytes instead.
1 parent cec1168 commit 70928dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

accelerator/common_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,9 @@ status_t ta_get_transaction_object(const iota_client_service_t* const service,
389389
(tryte_t*)cache_value, NUM_TRYTES_SERIALIZED_TRANSACTION, tx_trits,
390390
NUM_TRITS_SERIALIZED_TRANSACTION, NUM_TRITS_SERIALIZED_TRANSACTION);
391391
cache_set(cache, req, cache_value);
392+
} else {
393+
ret = SC_CCLIENT_NOT_FOUND;
394+
goto done;
392395
}
393396
}
394397

0 commit comments

Comments
 (0)