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
2fb8e26a
Commit
2fb8e26a
authored
5 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] Renames in order
parent
8715f410
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap_chain_net_srv_order.c
+15
-3
15 additions, 3 deletions
dap_chain_net_srv_order.c
with
15 additions
and
3 deletions
dap_chain_net_srv_order.c
+
15
−
3
View file @
2fb8e26a
...
...
@@ -57,7 +57,7 @@ char* dap_chain_net_srv_order_create(
uint64_t
a_price
,
// service price in datoshi, for SERV_CLASS_ONCE ONCE for the whole service, for SERV_CLASS_PERMANENT for one unit.
dap_chain_net_srv_price_unit_uid_t
a_price_unit
,
// Unit of service (seconds, megabytes, etc.) Only for SERV_CLASS_PERMANENT
dap_chain_time_t
a_expires
,
// TS when the service expires
const
char
*
a_
comments
const
char
*
a_
ext
)
{
if
(
a_net
)
{
...
...
@@ -71,8 +71,8 @@ char* dap_chain_net_srv_order_create(
memcpy
(
&
l_order
->
tx_cond_hash
,
&
a_tx_cond_hash
,
DAP_CHAIN_HASH_FAST_SIZE
);
l_order
->
price
=
a_price
;
l_order
->
price_unit
=
a_price_unit
;
if
(
a_
comments
)
strncpy
(
l_order
->
ext
,
a_
comments
,
sizeof
(
l_order
->
ext
)
-
1
);
if
(
a_
ext
)
strncpy
(
l_order
->
ext
,
a_
ext
,
sizeof
(
l_order
->
ext
)
-
1
);
dap_hash_fast
(
l_order
,
sizeof
(
*
l_order
),
l_order_hash
);
char
*
l_order_hash_str
=
dap_chain_hash_fast_to_str_new
(
l_order_hash
);
...
...
@@ -117,6 +117,18 @@ dap_chain_net_srv_order_t * dap_chain_net_srv_order_find_by_hash_str(dap_chain_n
return
l_order
;
}
/**
* @brief dap_chain_net_srv_order_find_all_by
* @param a_net
* @param a_srv_uid
* @param a_srv_class
* @param a_price_unit
* @param a_price_min
* @param a_price_max
* @param a_output_orders
* @param a_output_orders_count
* @return
*/
int
dap_chain_net_srv_order_find_all_by
(
dap_chain_net_t
*
a_net
,
dap_chain_net_srv_uid_t
a_srv_uid
,
dap_chain_net_srv_class_t
a_srv_class
,
dap_chain_net_srv_price_unit_uid_t
a_price_unit
,
uint64_t
a_price_min
,
uint64_t
a_price_max
,
dap_chain_net_srv_order_t
**
a_output_orders
,
size_t
*
a_output_orders_count
)
...
...
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