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
20
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
ec0001cd
Commit
ec0001cd
authored
1 year ago
by
pavel.uhanov
Committed by
Constantin P.
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
hotfix-9253
parent
c2ac1da6
No related branches found
No related tags found
1 merge request
!1212
hotfix-9253
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dap-sdk
+1
-1
1 addition, 1 deletion
dap-sdk
modules/consensus/block-poa/dap_chain_cs_block_poa.c
+14
-4
14 additions, 4 deletions
modules/consensus/block-poa/dap_chain_cs_block_poa.c
modules/consensus/dag-poa/dap_chain_cs_dag_poa.c
+9
-0
9 additions, 0 deletions
modules/consensus/dag-poa/dap_chain_cs_dag_poa.c
with
24 additions
and
5 deletions
dap-sdk
@
3e4943ec
Compare
94a7061f
...
3e4943ec
Subproject commit
94a7061f5e9d6332a3de7ddfa70b0b7d6b86abbf
Subproject commit
3e4943ec9c543a883f19cec7fdebb4a66c09ead4
This diff is collapsed.
Click to expand it.
modules/consensus/block-poa/dap_chain_cs_block_poa.c
+
14
−
4
View file @
ec0001cd
...
...
@@ -114,9 +114,19 @@ static int s_cli_block_poa(int argc, char ** argv, char **a_str_reply)
return
-
1
;
}
dap_chain_node_cli_cmd_values_parse_net_chain
(
&
arg_index
,
argc
,
argv
,
a_str_reply
,
&
l_chain
,
&
l_chain_net
);
if
(
dap_chain_node_cli_cmd_values_parse_net_chain
(
&
arg_index
,
argc
,
argv
,
a_str_reply
,
&
l_chain
,
&
l_chain_net
)){
return
-
3
;
}
const
char
*
l_chain_type
=
dap_chain_net_get_type
(
l_chain
);
if
(
strcmp
(
l_chain_type
,
"block_poa"
)){
dap_cli_server_cmd_set_reply_text
(
a_str_reply
,
"Type of chain %s is not block_poa. This chain with type %s is not supported by this command"
,
l_chain
->
name
,
l_chain_type
);
return
-
42
;
}
dap_chain_cs_blocks_t
*
l_blocks
=
DAP_CHAIN_CS_BLOCKS
(
l_chain
);
dap_chain_cs_blocks_t
*
l_blocks
=
DAP_CHAIN_CS_BLOCKS
(
l_chain
);
dap_chain_cs_block_poa_pvt_t
*
l_poa_pvt
=
PVT
(
DAP_CHAIN_CS_BLOCK_POA
(
l_blocks
)
);
const
char
*
l_block_new_cmd_str
=
NULL
;
...
...
@@ -127,12 +137,12 @@ static int s_cli_block_poa(int argc, char ** argv, char **a_str_reply)
dap_cli_server_cmd_find_option_val
(
argv
,
arg_index
,
argc
,
"-block"
,
&
l_block_hash_str
);
dap_cli_server_cmd_find_option_val
(
argv
,
arg_index
,
argc
,
"-cert"
,
&
l_cert_str
);
dap_enc_key_t
*
l_sign_key
;
dap_enc_key_t
*
l_sign_key
=
NULL
;
// Load cert to sign if its present
if
(
l_cert_str
)
{
dap_cert_t
*
l_cert
=
dap_cert_find_by_name
(
l_cert_str
);
l_sign_key
=
l_cert
->
enc_key
;
}
else
{
}
else
if
(
l_poa_pvt
)
{
l_sign_key
=
l_poa_pvt
->
sign_key
;
}
if
(
!
l_sign_key
||
!
l_sign_key
->
priv_key_data
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/consensus/dag-poa/dap_chain_cs_dag_poa.c
+
9
−
0
View file @
ec0001cd
...
...
@@ -195,6 +195,15 @@ static int s_cli_dag_poa(int argc, char ** argv, char **a_str_reply)
return
-
3
;
}
const
char
*
l_chain_type
=
dap_chain_net_get_type
(
l_chain
);
if
(
strcmp
(
l_chain_type
,
"dag_poa"
)){
dap_cli_server_cmd_set_reply_text
(
a_str_reply
,
"Type of chain %s is not dag_poa. This chain with type %s is not supported by this command"
,
l_chain
->
name
,
l_chain_type
);
return
-
42
;
}
dap_chain_cs_dag_t
*
l_dag
=
DAP_CHAIN_CS_DAG
(
l_chain
);
dap_chain_cs_dag_poa_pvt_t
*
l_poa_pvt
=
PVT
(
DAP_CHAIN_CS_DAG_POA
(
l_dag
)
);
...
...
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