Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-stream-ch-chain
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-stream-ch-chain
Commits
bceef78e
Commit
bceef78e
authored
6 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[+] shard id for pkt hdr
parent
ca191709
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap_stream_ch_chain.c
+2
-2
2 additions, 2 deletions
dap_stream_ch_chain.c
dap_stream_ch_chain_pkt.h
+3
-0
3 additions, 0 deletions
dap_stream_ch_chain_pkt.h
with
5 additions
and
2 deletions
dap_stream_ch_chain.c
+
2
−
2
View file @
bceef78e
...
...
@@ -49,7 +49,6 @@ typedef enum dap_stream_ch_chain_state{
typedef
struct
dap_stream_ch_chain
{
pthread_mutex_t
mutex
;
dap_chain_net_id_t
net_id
;
dap_chain_hash_t
block_id
;
}
dap_stream_ch_chain_t
;
...
...
@@ -115,7 +114,8 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch , void* a_arg)
dap_stream_ch_pkt_t
*
l_ch_pkt
=
(
dap_stream_ch_pkt_t
*
)
a_arg
;
dap_stream_ch_chain_pkt_t
*
l_chain_pkt
=
(
dap_stream_ch_chain_pkt_t
*
)
l_ch_pkt
->
data
;
if
(
l_chain_pkt
){
dap_chain_t
*
l_chain
=
dap_chain_find_by_id
(
l_ch_chain
->
net_id
,
l_chain_pkt
->
hdr
.
chain_id
);
dap_chain_t
*
l_chain
=
dap_chain_find_by_id
(
l_chain_pkt
->
hdr
.
net_id
,
l_chain_pkt
->
hdr
.
chain_id
,
l_chain_pkt
->
hdr
.
shard_id
);
if
(
l_chain
)
{
switch
(
l_chain_pkt
->
hdr
.
type
)
{
case
STREAM_CH_CHAIN_PKT_TYPE_REQUEST
:{
...
...
This diff is collapsed.
Click to expand it.
dap_stream_ch_chain_pkt.h
+
3
−
0
View file @
bceef78e
...
...
@@ -25,6 +25,7 @@
#include
<stdint.h>
#include
<stddef.h>
#include
"dap_common.h"
#include
"dap_chain_common.h"
#include
"dap_chain_datum.h"
#include
"dap_chain_block.h"
...
...
@@ -46,6 +47,8 @@ typedef union dap_stream_ch_chain_request{
typedef
struct
dap_stream_ch_chain_pkt_hdr
{
dap_chain_id_t
chain_id
;
dap_chain_net_id_t
net_id
;
dap_chain_shard_id_t
shard_id
;
uint8_t
type
;
uint8_t
padding1
[
3
];
union
{
...
...
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