Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-chain-cs-dag
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-chain-cs-dag
Commits
11a9b34a
Commit
11a9b34a
authored
6 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] New blockchain class API implementation
parent
e2cb0b6e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap_chain_cs_dag.c
+7
-5
7 additions, 5 deletions
dap_chain_cs_dag.c
with
7 additions
and
5 deletions
dap_chain_cs_dag.c
+
7
−
5
View file @
11a9b34a
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#include
<uthash.h>
#include
<uthash.h>
#include
"dap_common.h"
#include
"dap_common.h"
#include
"dap_chain_datum.h"
#include
"dap_chain_cs.h"
#include
"dap_chain_cs_dag.h"
#include
"dap_chain_cs_dag.h"
#define LOG_TAG "dap_chain_cs_dag"
#define LOG_TAG "dap_chain_cs_dag"
...
@@ -46,7 +48,7 @@ typedef struct dap_chain_cs_dag_pvt {
...
@@ -46,7 +48,7 @@ typedef struct dap_chain_cs_dag_pvt {
// Atomic element organization callbacks
// Atomic element organization callbacks
static
int
s_chain_callback_atom_add
(
dap_chain_t
*
a_chain
,
dap_chain_atom_t
*
);
// Accept new event in dag
static
int
s_chain_callback_atom_add
(
dap_chain_t
*
a_chain
,
dap_chain_atom_t
*
);
// Accept new event in dag
static
int
s_chain_callback_atom_verify
(
dap_chain_t
*
a_chain
,
dap_chain_atom_t
*
);
// Verify new event in dag
static
int
s_chain_callback_atom_verify
(
dap_chain_t
*
a_chain
,
dap_chain_atom_t
*
);
// Verify new event in dag
static
size_t
s_chain_callback_atom_get_size
(
dap_chain_atom_t
*
);
// Get dag event size
static
size_t
s_chain_callback_atom_
hdr_
get_size
(
dap_chain_atom_t
*
);
// Get dag event size
static
size_t
s_chain_callback_atom_get_static_hdr_size
(
dap_chain_t
*
);
// Get dag event header size
static
size_t
s_chain_callback_atom_get_static_hdr_size
(
dap_chain_t
*
);
// Get dag event header size
static
dap_chain_atom_iter_t
*
s_chain_callback_atom_iter_create
(
dap_chain_t
*
a_chain
);
// Get the fisrt event from dag
static
dap_chain_atom_iter_t
*
s_chain_callback_atom_iter_create
(
dap_chain_t
*
a_chain
);
// Get the fisrt event from dag
...
@@ -97,9 +99,9 @@ void dap_chain_cs_dag_new(dap_chain_t * a_chain, dap_config_t * a_chain_cfg)
...
@@ -97,9 +99,9 @@ void dap_chain_cs_dag_new(dap_chain_t * a_chain, dap_config_t * a_chain_cfg)
// Atom element callbacks
// Atom element callbacks
a_chain
->
callback_atom_add
=
s_chain_callback_atom_add
;
// Accept new element in chain
a_chain
->
callback_atom_add
=
s_chain_callback_atom_add
;
// Accept new element in chain
a_chain
->
callback_atom_verify
=
s_chain_callback_atom_add
;
// Verify new element in chain
a_chain
->
callback_atom_verify
[
0
]
=
s_chain_callback_atom_add
;
// Verify new element in chain
a_chain
->
callback_atom_get_size
=
s_chain_callback_atom_get_size
;
// Get dag event size
a_chain
->
callback_atom_
hdr_
get_size
=
s_chain_callback_atom_
hdr_
get_size
;
// Get dag event size
a_chain
->
callback_atom_get_
static_
hdr_size
=
s_chain_callback_atom_get_static_hdr_size
;
// Get dag event hdr size
a_chain
->
callback_atom_get_hdr_size
=
s_chain_callback_atom_get_static_hdr_size
;
// Get dag event hdr size
a_chain
->
callback_atom_iter_create
=
s_chain_callback_atom_iter_create
;
a_chain
->
callback_atom_iter_create
=
s_chain_callback_atom_iter_create
;
a_chain
->
callback_atom_iter_delete
=
s_chain_callback_atom_iter_delete
;
a_chain
->
callback_atom_iter_delete
=
s_chain_callback_atom_iter_delete
;
...
@@ -163,7 +165,7 @@ static int s_chain_callback_atom_verify(dap_chain_t * a_chain, dap_chain_atom_t
...
@@ -163,7 +165,7 @@ static int s_chain_callback_atom_verify(dap_chain_t * a_chain, dap_chain_atom_t
* @param a_atom
* @param a_atom
* @return
* @return
*/
*/
static
size_t
s_chain_callback_atom_get_size
(
dap_chain_atom_t
*
a_atom
)
static
size_t
s_chain_callback_atom_
hdr_
get_size
(
dap_chain_atom_t
*
a_atom
)
{
{
return
dap_chain_cs_dag_event_calc_size
(
(
dap_chain_cs_dag_event_t
*
)
a_atom
);
return
dap_chain_cs_dag_event_calc_size
(
(
dap_chain_cs_dag_event_t
*
)
a_atom
);
}
}
...
...
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