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
bbd28191
Commit
bbd28191
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'bugs-3508' into 'master'
Bugs 3508 See merge request
libdap-chain-cs-dag!11
parents
566b1bc0
7da1420f
No related branches found
Branches containing commit
No related tags found
1 merge request
!24
Support 3689
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap_chain_cs_dag.c
+3
-4
3 additions, 4 deletions
dap_chain_cs_dag.c
dap_chain_cs_dag_event.c
+1
-0
1 addition, 0 deletions
dap_chain_cs_dag_event.c
with
4 additions
and
4 deletions
dap_chain_cs_dag.c
+
3
−
4
View file @
bbd28191
...
...
@@ -299,7 +299,7 @@ static int s_chain_callback_atom_add(dap_chain_t * a_chain, dap_chain_atom_ptr_t
l_event
->
hashes_n_datum_n_signs
+
l_event
->
header
.
hash_count
*
sizeof
(
*
l_link_hash
)
);
l_link_hash
+=
sizeof
(
dap_chain_hash_fast_t
)
)
{
l_event_last
=
NULL
;
HASH_FIND
(
hh
,
PVT
(
l_dag
)
->
events_lasts_unlinked
,
&
l_link_hash
,
sizeof
(
l_link_hash
),
l_event_last
);
HASH_FIND
(
hh
,
PVT
(
l_dag
)
->
events_lasts_unlinked
,
&
l_link_hash
,
sizeof
(
*
l_link_hash
),
l_event_last
);
if
(
l_event_last
){
// If present in unlinked - remove
HASH_DEL
(
PVT
(
l_dag
)
->
events_lasts_unlinked
,
l_event_last
);
DAP_DELETE
(
l_event_last
);
...
...
@@ -1159,14 +1159,14 @@ static int s_cli_dag(int argc, char ** argv, void *arg_func, char **a_str_reply)
}
if
(
l_event
){
dap_string_t
*
l_str_tmp
=
dap_string_new
(
NULL
);
char
*
l_ctime_tmp
=
NULL
;
char
buf
[
50
]
;
time_t
l_ts_reated
=
(
time_t
)
l_event
->
header
.
ts_created
;
// Header
dap_string_append_printf
(
l_str_tmp
,
"Event %s:
\n
"
,
l_event_hash_str
);
dap_string_append_printf
(
l_str_tmp
,
"
\t\t\t\t
version: 0x%04sX
\n
"
,
l_event
->
header
.
version
);
dap_string_append_printf
(
l_str_tmp
,
"
\t\t\t\t
cell_id: 0x%016llX
\n
"
,
l_event
->
header
.
cell_id
.
uint64
);
dap_string_append_printf
(
l_str_tmp
,
"
\t\t\t\t
chain_id: 0x%016llX
\n
"
,
l_event
->
header
.
chain_id
.
uint64
);
dap_string_append_printf
(
l_str_tmp
,
"
\t\t\t\t
ts_created: %s
\n
"
,
ctime_r
(
&
l_ts_reated
,
l_ctime_tmp
)
);
dap_string_append_printf
(
l_str_tmp
,
"
\t\t\t\t
ts_created: %s
\n
"
,
ctime_r
(
&
l_ts_reated
,
buf
)
);
// Hash links
dap_string_append_printf
(
l_str_tmp
,
"
\t\t\t\t
hashes:
\t
count: %us
\n
"
,
l_event
->
header
.
hash_count
);
...
...
@@ -1180,7 +1180,6 @@ static int s_cli_dag(int argc, char ** argv, void *arg_func, char **a_str_reply)
size_t
l_offset
=
l_event
->
header
.
hash_count
*
sizeof
(
dap_chain_hash_fast_t
);
dap_chain_datum_t
*
l_datum
=
(
dap_chain_datum_t
*
)
(
l_event
->
hashes_n_datum_n_signs
+
l_offset
);
size_t
l_datum_size
=
dap_chain_datum_size
(
l_datum
);
char
buf
[
50
];
time_t
l_datum_ts_create
=
(
time_t
)
l_datum
->
header
.
ts_create
;
// Nested datum
...
...
This diff is collapsed.
Click to expand it.
dap_chain_cs_dag_event.c
+
1
−
0
View file @
bbd28191
...
...
@@ -77,6 +77,7 @@ dap_chain_cs_dag_event_t * dap_chain_cs_dag_event_new(dap_chain_id_t a_chain_id,
DAP_DELETE
(
l_sign
);
}
else
{
log_it
(
L_ERROR
,
"Can't sign dag event!"
);
DAP_DELETE
(
l_event_new
);
return
NULL
;
}
}
else
{
...
...
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