From 70928dd3b03ab4efbf516cd1d6a897f192ced9fb Mon Sep 17 00:00:00 2001 From: Yu Wei Wu Date: Mon, 18 Mar 2019 13:09:21 +0800 Subject: [PATCH] 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. --- accelerator/common_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accelerator/common_core.c b/accelerator/common_core.c index 1e4364c4..e6b4b796 100644 --- a/accelerator/common_core.c +++ b/accelerator/common_core.c @@ -389,6 +389,9 @@ status_t ta_get_transaction_object(const iota_client_service_t* const service, (tryte_t*)cache_value, NUM_TRYTES_SERIALIZED_TRANSACTION, tx_trits, NUM_TRITS_SERIALIZED_TRANSACTION, NUM_TRITS_SERIALIZED_TRANSACTION); cache_set(cache, req, cache_value); + } else { + ret = SC_CCLIENT_NOT_FOUND; + goto done; } }