From cd7700a7d34455c4105c7366009db5faacfd6c9c Mon Sep 17 00:00:00 2001 From: "roman.khlopkov" <roman.khlopkov@demlabs.net> Date: Mon, 12 Feb 2024 12:41:01 +0300 Subject: [PATCH] [*] Stake service cluster managment --- dap-sdk | 2 +- modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dap-sdk b/dap-sdk index 5f9e8c29db..c427c10945 160000 --- a/dap-sdk +++ b/dap-sdk @@ -1 +1 @@ -Subproject commit 5f9e8c29db8112744e947c2fa29d0a71936cecde +Subproject commit c427c109455c41aabb0cb21d35129b7628ee823c diff --git a/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c b/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c index f7bfbe5afb..da0906debc 100644 --- a/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c +++ b/modules/service/stake/dap_chain_net_srv_stake_pos_delegate.c @@ -305,7 +305,7 @@ void dap_chain_net_srv_stake_key_delegate(dap_chain_net_t *a_net, dap_chain_addr } } } - + dap_chain_esbocs_add_validator_to_clusters(a_net->pub.id, a_node_addr); char l_key_hash_str[DAP_CHAIN_HASH_FAST_STR_SIZE]; dap_chain_hash_fast_to_str(&a_signing_addr->data.hash_fast, l_key_hash_str, DAP_CHAIN_HASH_FAST_STR_SIZE); @@ -323,6 +323,7 @@ void dap_chain_net_srv_stake_key_invalidate(dap_chain_addr_t *a_signing_addr) dap_chain_net_srv_stake_item_t *l_stake = NULL; HASH_FIND(hh, s_srv_stake->itemlist, a_signing_addr, sizeof(dap_chain_addr_t), l_stake); if (l_stake) { + dap_chain_esbocs_remove_validator_from_clusters(l_stake->signing_addr.net_id, &l_stake->node_addr); HASH_DEL(s_srv_stake->itemlist, l_stake); HASH_DELETE(ht, s_srv_stake->tx_itemlist, l_stake); char l_key_hash_str[DAP_CHAIN_HASH_FAST_STR_SIZE]; -- GitLab