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
18
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
64b9d83d
Commit
64b9d83d
authored
2 years ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Plain Diff
Merge branch 'backport-5927' into 'develop'
Backport 5927 See merge request
!972
parents
7607a8ab
afbf43b2
No related branches found
No related tags found
1 merge request
!972
Backport 5927
Pipeline
#22693
passed with stage
Stage: build
in 8 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/mempool/dap_chain_mempool.c
+8
-3
8 additions, 3 deletions
modules/mempool/dap_chain_mempool.c
with
8 additions
and
3 deletions
modules/mempool/dap_chain_mempool.c
+
8
−
3
View file @
64b9d83d
...
...
@@ -313,6 +313,7 @@ int dap_chain_mempool_tx_create_massive( dap_chain_t * a_chain, dap_enc_key_t *a
return
-
2
;
}
dap_chain_hash_fast_t
l_tx_new_hash
=
{
0
};
for
(
size_t
i
=
0
;
i
<
a_tx_num
;
i
++
){
log_it
(
L_DEBUG
,
"Prepare tx %zu"
,
i
);
// find the transactions from which to take away coins
...
...
@@ -404,13 +405,12 @@ int dap_chain_mempool_tx_create_massive( dap_chain_t * a_chain, dap_enc_key_t *a
// now tx is formed - calc size and hash
size_t
l_tx_size
=
dap_chain_datum_tx_get_size
(
l_tx_new
);
dap_chain_hash_fast_t
l_tx_new_hash
;
dap_hash_fast
(
l_tx_new
,
l_tx_size
,
&
l_tx_new_hash
);
// If we have value back - update balance cache
if
(
!
IS_ZERO_256
(
l_value_back
))
{
//log_it(L_DEBUG,"We have value back %"DAP_UINT64_FORMAT_U" now lets see how many outputs we have", l_value_back);
int
l_item_count
=
0
;
dap_list_t
*
l_list_out_items
=
dap_chain_datum_tx_items_get
(
l_tx_new
,
TX_ITEM_TYPE_OUT
,
dap_list_t
*
l_list_out_items
=
dap_chain_datum_tx_items_get
(
l_tx_new
,
TX_ITEM_TYPE_OUT
_ALL
,
&
l_item_count
);
dap_list_t
*
l_list_tmp
=
l_list_out_items
;
int
l_out_idx_tmp
=
0
;
// current index of 'out' item
...
...
@@ -422,6 +422,11 @@ int dap_chain_mempool_tx_create_massive( dap_chain_t * a_chain, dap_enc_key_t *a
l_out_idx_tmp
++
;
continue
;
}
if
(
l_out
->
header
.
type
==
TX_ITEM_TYPE_OUT_COND
)
{
l_list_tmp
=
l_list_tmp
->
next
;
l_out_idx_tmp
++
;
continue
;
}
if
(
memcmp
(
&
l_out
->
addr
,
a_addr_from
,
sizeof
(
*
a_addr_from
))
==
0
){
list_used_item_t
*
l_item_back
=
DAP_NEW_Z
(
list_used_item_t
);
l_item_back
->
tx_hash_fast
=
l_tx_new_hash
;
...
...
@@ -448,7 +453,7 @@ int dap_chain_mempool_tx_create_massive( dap_chain_t * a_chain, dap_enc_key_t *a
l_objs
[
i
].
key
=
dap_chain_hash_fast_to_str_new
(
&
l_tx_new_hash
);
//continue;
l_objs
[
i
].
value
=
(
uint8_t
*
)
l_datum
;
l_objs
[
i
].
value_len
=
l_tx_size
+
sizeof
(
l_datum
->
header
);
l_objs
[
i
].
value_len
=
dap_chain_datum_size
(
l_datum
);
log_it
(
L_DEBUG
,
"Prepared obj with key %s (value_len = %"
DAP_UINT64_FORMAT_U
")"
,
l_objs
[
i
].
key
?
l_objs
[
i
].
key
:
"NULL"
,
l_objs
[
i
].
value_len
);
...
...
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