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
16
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
8ca6372c
Commit
8ca6372c
authored
4 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature-4242' into 'master'
fixed command tx_history See merge request
!140
parents
e85f8701
e80cace3
No related branches found
Branches containing commit
No related tags found
2 merge requests
!148
Master
,
!140
fixed command tx_history
Pipeline
#4153
passed with stage
Stage: analyze
in 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/net/dap_chain_node_cli_cmd_tx.c
+25
-24
25 additions, 24 deletions
modules/net/dap_chain_node_cli_cmd_tx.c
with
25 additions
and
24 deletions
modules/net/dap_chain_node_cli_cmd_tx.c
+
25
−
24
View file @
8ca6372c
...
...
@@ -518,46 +518,47 @@ char* dap_db_history_addr(dap_chain_addr_t * a_addr, dap_chain_t * a_chain)
}
}
char
*
l_dst_to_str
=
(
l_tx_prev_out
)
?
dap_chain_addr_to_str
(
&
l_tx_prev_out
->
addr
)
:
NULL
;
// if use dst addr
bool
l_is_use_dst_addr
=
false
;
if
(
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
l_is_use_dst_addr
=
true
;
l_src_str_is_cur
=
l_is_use_src_addr
;
if
(
l_src_addr
->
len
<=
1
)
{
l_src_str
=
(
l_tx_data
)
?
dap_chain_addr_to_str
(
&
l_tx_data
->
addr
)
:
NULL
;
if
(
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
if
(
l_tx_prev_out
&&
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
l_src_str_is_cur
=
true
;
dap_string_free
(
l_src_addr
,
true
);
}
else
l_src_str
=
dap_string_free
(
l_src_addr
,
false
);
if
(
l_is_use_src_addr
&&
!
l_is_use_dst_addr
)
{
dap_string_append_printf
(
l_str_out
,
"tx hash %s
\n
%s in send %lu %s from %s
\n
to %s
\n
"
,
l_tx_data
->
tx_hash_str
,
l_time_str
?
l_time_str
:
""
,
l_tx_prev_out
->
header
.
value
,
l_tx_data
->
token_ticker
,
l_src_str
?
l_src_str
:
""
,
l_dst_to_str
);
}
else
if
(
l_is_use_dst_addr
&&
!
l_is_use_src_addr
)
{
if
(
!
l_src_str_is_cur
)
if
(
l_tx_prev_out
)
{
char
*
l_dst_to_str
=
dap_chain_addr_to_str
(
&
l_tx_prev_out
->
addr
);
// if use dst addr
bool
l_is_use_dst_addr
=
false
;
if
(
!
memcmp
(
&
l_tx_prev_out
->
addr
,
a_addr
,
sizeof
(
dap_chain_addr_t
)))
l_is_use_dst_addr
=
true
;
if
(
l_is_use_src_addr
&&
!
l_is_use_dst_addr
)
{
dap_string_append_printf
(
l_str_out
,
"tx hash %s
\n
%s in
recv
%lu %s from %s
\n
"
,
"tx hash %s
\n
%s in
send
%lu %s from
%s
\n
to
%s
\n
"
,
l_tx_data
->
tx_hash_str
,
l_time_str
?
l_time_str
:
""
,
l_tx_prev_out
->
header
.
value
,
l_tx_data
->
token_ticker
,
l_src_str
?
l_src_str
:
""
);
}
l_src_str
?
l_src_str
:
""
,
l_dst_to_str
);
}
else
if
(
l_is_use_dst_addr
&&
!
l_is_use_src_addr
)
{
if
(
!
l_src_str_is_cur
)
dap_string_append_printf
(
l_str_out
,
"tx hash %s
\n
%s in recv %lu %s from %s
\n
"
,
l_tx_data
->
tx_hash_str
,
l_time_str
?
l_time_str
:
""
,
l_tx_prev_out
->
header
.
value
,
l_tx_data
->
token_ticker
,
l_src_str
?
l_src_str
:
""
);
}
DAP_DELETE
(
l_dst_to_str
);
DAP_DELETE
(
l_dst_to_str
);
}
dap_list_free
(
l_list_out_prev_items
);
}
...
...
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