Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
4a75f417
Commit
4a75f417
authored
2 years ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Plain Diff
Merge branch 'features-8375' into 'release-5.2'
Features 8375 See merge request
!1040
parents
c52f7145
a98b114b
No related branches found
Branches containing commit
No related tags found
1 merge request
!1040
Features 8375
Pipeline
#25067
passed with stage
Stage: build
in 8 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/net/srv/dap_chain_net_srv_order.c
+17
-0
17 additions, 0 deletions
modules/net/srv/dap_chain_net_srv_order.c
modules/service/stake_pos_delegate/include/dap_chain_net_srv_stake_pos_delegate.h
+1
-0
1 addition, 0 deletions
...s_delegate/include/dap_chain_net_srv_stake_pos_delegate.h
with
18 additions
and
0 deletions
modules/net/srv/dap_chain_net_srv_order.c
+
17
−
0
View file @
4a75f417
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include
"dap_enc_base58.h"
#include
"dap_enc_base58.h"
#include
"dap_global_db.h"
#include
"dap_global_db.h"
#include
"dap_chain_net_srv_countries.h"
#include
"dap_chain_net_srv_countries.h"
#include
"dap_chain_net_srv_stake_pos_delegate.h"
#define LOG_TAG "dap_chain_net_srv_order"
#define LOG_TAG "dap_chain_net_srv_order"
...
@@ -617,6 +618,22 @@ static void s_srv_order_callback_notify(dap_global_db_context_t *a_context, dap_
...
@@ -617,6 +618,22 @@ static void s_srv_order_callback_notify(dap_global_db_context_t *a_context, dap_
log_it
(
L_ERROR
,
"Order unverified, err %d"
,
l_verify
);
log_it
(
L_ERROR
,
"Order unverified, err %d"
,
l_verify
);
dap_global_db_del_unsafe
(
l_gdb_context
,
a_obj
->
group
,
a_obj
->
key
);
dap_global_db_del_unsafe
(
l_gdb_context
,
a_obj
->
group
,
a_obj
->
key
);
}
}
// Check new order is signs delegated key
for
(
size_t
l_offset
=
0
;
l_offset
<
l_max_size
;)
{
dap_sign_t
*
l_tmp_sign
=
(
dap_sign_t
*
)(
l_sign
+
l_offset
);
l_offset
+=
dap_sign_get_size
(
l_tmp_sign
);
dap_hash_fast_t
l_pkey_hash
=
{
0
};
dap_sign_get_pkey_hash
(
l_sign
,
&
l_pkey_hash
);
dap_chain_addr_t
l_addr
=
{
0
};
dap_chain_addr_fill
(
&
l_addr
,
l_tmp_sign
->
header
.
type
,
&
l_pkey_hash
,
l_net
->
pub
.
id
);
if
(
!
dap_chain_net_srv_stake_key_delegated
(
&
l_addr
))
{
char
*
l_pkey_hash_str
=
dap_hash_fast_to_str_new
(
&
l_pkey_hash
);
log_it
(
L_ERROR
,
"Order %s signed by the non-delegated public key %s."
,
a_obj
->
key
,
l_pkey_hash_str
);
DAP_DELETE
(
l_pkey_hash_str
);
dap_global_db_del_unsafe
(
l_gdb_context
,
a_obj
->
group
,
a_obj
->
key
);
break
;
}
}
/*dap_chain_hash_fast_t l_pkey_hash;
/*dap_chain_hash_fast_t l_pkey_hash;
if (!dap_sign_get_pkey_hash(l_sign, &l_pkey_hash)) {
if (!dap_sign_get_pkey_hash(l_sign, &l_pkey_hash)) {
dap_global_db_gr_del(dap_strdup(a_key), a_group);
dap_global_db_gr_del(dap_strdup(a_key), a_group);
...
...
This diff is collapsed.
Click to expand it.
modules/service/stake_pos_delegate/include/dap_chain_net_srv_stake_pos_delegate.h
+
1
−
0
View file @
4a75f417
...
@@ -74,3 +74,4 @@ void dap_chain_net_srv_stake_get_fee_validators(dap_chain_net_t *a_net, dap_stri
...
@@ -74,3 +74,4 @@ void dap_chain_net_srv_stake_get_fee_validators(dap_chain_net_t *a_net, dap_stri
int
dap_chain_net_srv_stake_load_cache
(
dap_chain_net_t
*
a_net
);
int
dap_chain_net_srv_stake_load_cache
(
dap_chain_net_t
*
a_net
);
void
dap_chain_net_srv_stake_cache_purge
(
dap_chain_net_t
*
a_net
);
void
dap_chain_net_srv_stake_cache_purge
(
dap_chain_net_t
*
a_net
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment