Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-chain-wallet
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-wallet
Commits
6104dbf5
Commit
6104dbf5
authored
5 years ago
by
ANTA
Browse files
Options
Downloads
Patches
Plain Diff
1.1-11-Win
parent
0406c6ea
No related branches found
No related tags found
1 merge request
!3
Master
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+14
-2
14 additions, 2 deletions
CMakeLists.txt
dap_chain_wallet.c
+22
-4
22 additions, 4 deletions
dap_chain_wallet.c
dap_chain_wallet_ops.c
+23
-0
23 additions, 0 deletions
dap_chain_wallet_ops.c
with
59 additions
and
6 deletions
CMakeLists.txt
+
14
−
2
View file @
6104dbf5
...
...
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
project
(
dap_chain_wallet
)
set
(
DAP_CHAIN_WALLET_SRCS
dap_chain_wallet.c
dap_chain_wallet.c
dap_chain_coin.c
dap_chain_wallet_ops.c
...
...
@@ -15,10 +15,22 @@ set(DAP_CHAIN_WALLET_HEADERS
dap_chain_wallet_ops.h
)
add_library
(
${
PROJECT_NAME
}
STATIC
${
DAP_CHAIN_WALLET_SRCS
}
${
DAP_CHAIN_WALLET_HEADERS
}
)
if
(
WIN32
)
include_directories
(
../libdap/src/win32/
)
include_directories
(
../3rdparty/libmemcached/
)
include_directories
(
../3rdparty/libmemcached/win32/
)
include_directories
(
../3rdparty/wepoll/include/
)
include_directories
(
../3rdparty/uthash/src/
)
include_directories
(
../3rdparty/libjson-c/
)
include_directories
(
../3rdparty/libmagic/src/
)
include_directories
(
../3rdparty/curl/include/
)
include_directories
(
../3rdparty/libsqlite3/
)
endif
()
add_library
(
${
PROJECT_NAME
}
STATIC
${
DAP_CHAIN_WALLET_SRCS
}
${
DAP_CHAIN_WALLET_HEADERS
}
)
target_link_libraries
(
dap_chain_wallet dap_core dap_crypto dap_chain dap_chain_crypto dap_chain_net
)
target_include_directories
(
dap_chain_wallet INTERFACE .
)
set
(
${
PROJECT_NAME
}
_DEFINITIONS CACHE INTERNAL
"
${
PROJECT_NAME
}
: Definitions"
FORCE
)
...
...
This diff is collapsed.
Click to expand it.
dap_chain_wallet.c
+
22
−
4
View file @
6104dbf5
...
...
@@ -22,10 +22,28 @@
along with any DAP based project. If not, see <http://www.gnu.org/licenses/>.
*/
#include
<stdlib.h>
#include
<stdio.h>
#include
<time.h>
#include
<stdlib.h>
#include
<stddef.h>
#include
<stdint.h>
#include
<string.h>
#include
<errno.h>
#include
<stdint.h>
#include
<stdio.h>
#ifdef WIN32
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#include
<winsock2.h>
#include
<windows.h>
#include
<mswsock.h>
#include
<ws2tcpip.h>
#include
<io.h>
#include
<wepoll.h>
#endif
#include
<pthread.h>
#include
"dap_common.h"
#include
"dap_chain_cert_file.h"
#include
"dap_chain_wallet.h"
...
...
@@ -72,7 +90,7 @@ dap_chain_wallet_t * dap_chain_wallet_create(const char * a_wallet_name, const c
size_t
l_file_name_size
=
strlen
(
a_wallet_name
)
+
strlen
(
a_wallets_path
)
+
13
;
l_wallet_internal
->
file_name
=
DAP_NEW_Z_SIZE
(
char
,
l_file_name_size
);
snprintf
(
l_wallet_internal
->
file_name
,
l_file_name_size
,
"%s/%s.dwallet"
,
a_wallets_path
,
a_wallet_name
);
dap_
snprintf
(
l_wallet_internal
->
file_name
,
l_file_name_size
,
"%s/%s.dwallet"
,
a_wallets_path
,
a_wallet_name
);
l_wallet_internal
->
certs
[
0
]
=
dap_chain_cert_generate_mem
(
a_wallet_name
,
dap_chain_sign_type_to_key_type
(
a_sig_type
));
...
...
@@ -305,7 +323,7 @@ dap_chain_wallet_t * dap_chain_wallet_open(const char * a_wallet_name, const cha
return
NULL
;
size_t
l_file_name_size
=
strlen
(
a_wallet_name
)
+
strlen
(
a_wallets_path
)
+
13
;
char
*
l_file_name
=
DAP_NEW_Z_SIZE
(
char
,
l_file_name_size
);
snprintf
(
l_file_name
,
l_file_name_size
,
"%s/%s.dwallet"
,
a_wallets_path
,
a_wallet_name
);
dap_
snprintf
(
l_file_name
,
l_file_name_size
,
"%s/%s.dwallet"
,
a_wallets_path
,
a_wallet_name
);
dap_chain_wallet_t
*
l_wallet
=
dap_chain_wallet_open_file
(
l_file_name
);
DAP_DELETE
(
l_file_name
);
return
l_wallet
;
...
...
This diff is collapsed.
Click to expand it.
dap_chain_wallet_ops.c
+
23
−
0
View file @
6104dbf5
#include
<stdlib.h>
#include
<stdio.h>
#include
<time.h>
#include
<stdlib.h>
#include
<stddef.h>
#include
<stdint.h>
#include
<string.h>
#include
<errno.h>
#ifdef WIN32
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#include
<winsock2.h>
#include
<windows.h>
#include
<mswsock.h>
#include
<ws2tcpip.h>
#include
<io.h>
#include
<wepoll.h>
#endif
#include
<pthread.h>
#include
"dap_chain_common.h"
#include
"dap_chain_wallet_ops.h"
...
...
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