Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-chain-net-srv
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-net-srv
Commits
959b4f77
Commit
959b4f77
authored
5 years ago
by
Aleksandr Lysikov
Browse files
Options
Downloads
Patches
Plain Diff
added support dap_ledger_t
parent
c7196e73
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap_chain_net_srv_common.c
+4
-4
4 additions, 4 deletions
dap_chain_net_srv_common.c
dap_chain_net_srv_common.h
+3
-1
3 additions, 1 deletion
dap_chain_net_srv_common.h
with
7 additions
and
5 deletions
dap_chain_net_srv_common.c
+
4
−
4
View file @
959b4f77
...
@@ -26,11 +26,10 @@
...
@@ -26,11 +26,10 @@
#include
<stdint.h>
#include
<stdint.h>
#include
"dap_strfuncs.h"
#include
"dap_strfuncs.h"
#include
"rand/dap_rand.h"
#include
"rand/dap_rand.h"
#include
"dap_chain_net_srv_common.h"
#include
"dap_chain_datum_tx_items.h"
#include
"dap_chain_datum_tx_items.h"
#include
"dap_chain_utxo.h"
#include
"dap_stream.h"
#include
"dap_stream.h"
#include
"dap_server_http_db_auth.h"
#include
"dap_server_http_db_auth.h"
#include
"dap_chain_net_srv_common.h"
/**
/**
* copy a_value_dst to a_uid_src
* copy a_value_dst to a_uid_src
...
@@ -73,7 +72,8 @@ void dap_chain_net_srv_abstract_set(dap_chain_net_srv_abstract_t *a_cond, uint8_
...
@@ -73,7 +72,8 @@ void dap_chain_net_srv_abstract_set(dap_chain_net_srv_abstract_t *a_cond, uint8_
/**
/**
*
*
*/
*/
uint64_t
dap_chain_net_srv_client_auth
(
const
char
*
a_service_key
,
const
dap_chain_net_srv_abstract_t
**
a_cond_out
)
uint64_t
dap_chain_net_srv_client_auth
(
dap_ledger_t
*
a_ledger
,
const
char
*
a_service_key
,
const
dap_chain_net_srv_abstract_t
**
a_cond_out
)
{
{
char
*
l_addr_base58
;
char
*
l_addr_base58
;
char
*
l_sign_hash_str
;
char
*
l_sign_hash_str
;
...
@@ -92,7 +92,7 @@ uint64_t dap_chain_net_srv_client_auth(const char *a_service_key, const dap_chai
...
@@ -92,7 +92,7 @@ uint64_t dap_chain_net_srv_client_auth(const char *a_service_key, const dap_chai
memcpy
(
&
l_sig_type
,
&
l_addr
->
sig_type
,
sizeof
(
dap_chain_sign_type_t
));
memcpy
(
&
l_sig_type
,
&
l_addr
->
sig_type
,
sizeof
(
dap_chain_sign_type_t
));
// Search all value in transactions with l_addr in 'out_cond' item
// Search all value in transactions with l_addr in 'out_cond' item
uint64_t
l_value
=
dap_chain_
utxo
_tx_cache_get_out_cond_value
(
l_addr
,
&
l_tx_out_cond
);
uint64_t
l_value
=
dap_chain_
ledger
_tx_cache_get_out_cond_value
(
a_ledger
,
l_addr
,
&
l_tx_out_cond
);
DAP_DELETE
(
l_addr
);
DAP_DELETE
(
l_addr
);
// not found transaction with l_addr in 'out_cond' item
// not found transaction with l_addr in 'out_cond' item
if
(
!
l_value
)
if
(
!
l_value
)
...
...
This diff is collapsed.
Click to expand it.
dap_chain_net_srv_common.h
+
3
−
1
View file @
959b4f77
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include
"dap_math_ops.h"
#include
"dap_math_ops.h"
#include
"dap_server.h"
#include
"dap_server.h"
#include
"dap_stream_ch.h"
#include
"dap_stream_ch.h"
#include
"dap_chain_ledger.h"
#define DAP_CHAIN_NET_SRV_UID_SIZE 16
#define DAP_CHAIN_NET_SRV_UID_SIZE 16
typedef
union
{
typedef
union
{
...
@@ -105,4 +106,5 @@ void dap_chain_net_srv_uid_set(dap_chain_net_srv_uid_t *a_uid_src, uint128_t a_v
...
@@ -105,4 +106,5 @@ void dap_chain_net_srv_uid_set(dap_chain_net_srv_uid_t *a_uid_src, uint128_t a_v
// generate new dap_chain_net_srv_uid_t
// generate new dap_chain_net_srv_uid_t
bool
dap_chain_net_srv_gen_uid
(
uint8_t
*
a_srv
,
size_t
a_srv_size
);
bool
dap_chain_net_srv_gen_uid
(
uint8_t
*
a_srv
,
size_t
a_srv_size
);
uint64_t
dap_chain_net_srv_client_auth
(
const
char
*
a_service_key
,
const
dap_chain_net_srv_abstract_t
**
a_cond_out
);
uint64_t
dap_chain_net_srv_client_auth
(
dap_ledger_t
*
a_ledger
,
const
char
*
a_service_key
,
const
dap_chain_net_srv_abstract_t
**
a_cond_out
);
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