From 4cc9a43c0d957b242708016c9ed3a41104248c61 Mon Sep 17 00:00:00 2001 From: "daniil.frolov" <daniil.frolov@demlabs.net> Date: Tue, 19 Sep 2023 15:19:32 +0700 Subject: [PATCH] fix wrong out_cond_idx --- modules/chain/dap_chain_ledger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chain/dap_chain_ledger.c b/modules/chain/dap_chain_ledger.c index a5ac3b20fe..5ee77dcd1a 100644 --- a/modules/chain/dap_chain_ledger.c +++ b/modules/chain/dap_chain_ledger.c @@ -3342,7 +3342,7 @@ dap_hash_fast_t *dap_chain_ledger_get_final_chain_tx_hash(dap_ledger_t *a_ledger HASH_VALUE(l_tx_hash, sizeof(*l_tx_hash), l_hash_value); HASH_FIND_BYHASHVALUE(hh, l_ledger_pvt->ledger_items, l_tx_hash, sizeof(*l_tx_hash), l_hash_value, l_item); if (l_item) { - int l_out_num = 0; + int l_out_num = -1; dap_chain_datum_tx_out_cond_get(l_item->tx, a_cond_type, &l_out_num); if (l_out_num != -1 && l_out_num < MAX_OUT_ITEMS) { if (dap_hash_fast_is_blank(&l_item->cache_data.tx_hash_spent_fast[l_out_num])) -- GitLab