From cd6010dd5b310e982b09e48f565f66a459451996 Mon Sep 17 00:00:00 2001
From: Roman Khlopkov <roman.khlopkov@demlabs.net>
Date: Thu, 13 Jul 2023 16:00:57 +0300
Subject: [PATCH] [*] Pipeline fix with ledger test crash

---
 dap-sdk                          | 2 +-
 modules/chain/dap_chain_ledger.c | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/dap-sdk b/dap-sdk
index 6c41c1c308..15a26c4c06 160000
--- a/dap-sdk
+++ b/dap-sdk
@@ -1 +1 @@
-Subproject commit 6c41c1c308b8247f172b77dc4656d0f3eecf38e0
+Subproject commit 15a26c4c061355b21dba20b56bb0a92efcd49343
diff --git a/modules/chain/dap_chain_ledger.c b/modules/chain/dap_chain_ledger.c
index 0700873c77..93700d21d6 100644
--- a/modules/chain/dap_chain_ledger.c
+++ b/modules/chain/dap_chain_ledger.c
@@ -2486,12 +2486,12 @@ dap_ledger_t *dap_chain_ledger_create(uint16_t a_flags, char *a_net_name, const
     pthread_cond_init(&l_ledger_pvt->load_cond, NULL);
     pthread_mutex_init(&l_ledger_pvt->load_mutex, NULL);
 
+#ifndef DAP_CHAIN_LEDGER_TEST
     char * l_chains_path = dap_strdup_printf("%s/network/%s", dap_config_path(), a_net_name);
     DIR * l_chains_dir = opendir(l_chains_path);
     DAP_DEL_Z(l_chains_path);
 
     struct dirent * l_dir_entry;
-    uint8_t i = 0;
     while ( (l_dir_entry = readdir(l_chains_dir) )!= NULL ){
         if (l_dir_entry->d_name[0] == '\0')
             continue;
@@ -2517,12 +2517,6 @@ dap_ledger_t *dap_chain_ledger_create(uint16_t a_flags, char *a_net_name, const
     }
     closedir(l_chains_dir);
 
-    log_it(L_DEBUG,"Created ledger \"%s\"",a_net_name);
-    l_ledger_pvt->load_mode = true;
-    l_ledger_pvt->tps_timer = NULL;
-    l_ledger_pvt->tps_count = 0;
-
-#ifndef DAP_CHAIN_LEDGER_TEST
     if ( l_ledger_pvt->cached )
         // load ledger cache from GDB
         dap_chain_ledger_load_cache(l_ledger);
-- 
GitLab