Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
77024742
Unverified
Commit
77024742
authored
Mar 24, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2341 Added tags for older commits
parent
a2fdbcb7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
14 deletions
+26
-14
Log.cpp
Log.cpp
+2
-1
SGXWalletServer.cpp
SGXWalletServer.cpp
+17
-0
SGXWalletServer.h
SGXWalletServer.h
+2
-0
sgxwallet_common.h
sgxwallet_common.h
+0
-11
testw.cpp
testw.cpp
+5
-2
No files found.
Log.cpp
View file @
77024742
...
...
@@ -21,8 +21,9 @@
@date 2018
*/
#include "spdlog/spdlog.h"
#include "sgxwallet_common.h"
#include "common.h"
#include "Log.h"
using
namespace
std
;
...
...
SGXWalletServer.cpp
View file @
77024742
...
...
@@ -45,6 +45,23 @@
#include "common.h"
void
setFullOptions
(
int
_printDebugInfo
,
int
_useHTTPS
,
int
_autoconfirm
,
int
_encryptKeys
)
{
if
(
_printDebugInfo
)
spdlog
::
set_level
(
spdlog
::
level
::
info
);
else
{
spdlog
::
set_level
(
spdlog
::
level
::
debug
);
}
printDebugInfo
=
_printDebugInfo
;
useHTTPS
=
_useHTTPS
;
autoconfirm
=
_autoconfirm
;
encryptKeys
=
_encryptKeys
;
}
void
setOptions
(
int
_printDebugInfo
,
int
_useHTTPS
,
int
_autoconfirm
)
{
setFullOptions
(
_printDebugInfo
,
_useHTTPS
,
_autoconfirm
,
false
);
}
bool
isStringDec
(
string
&
_str
)
{
auto
res
=
find_if_not
(
_str
.
begin
(),
_str
.
end
(),
[](
char
c
)
->
bool
{
...
...
SGXWalletServer.h
View file @
77024742
...
...
@@ -31,6 +31,8 @@
#endif
EXTERNC
void
setFullOptions
(
int
_printDebugInfo
,
int
_useHTTPS
,
int
_autoconfirm
,
int
_encryptKeys
);
EXTERNC
void
setOptions
(
int
_printDebugInfo
,
int
_useHTTPS
,
int
_autoconfirm
);
...
...
sgxwallet_common.h
View file @
77024742
...
...
@@ -35,7 +35,6 @@
extern
int
printDebugInfo
;
extern
int
useHTTPS
;
extern
int
encryptKeys
;
...
...
@@ -43,17 +42,7 @@ extern int autoconfirm;
inline
void
setFullOptions
(
int
_printDebugInfo
,
int
_useHTTPS
,
int
_autoconfirm
,
int
_encryptKeys
)
{
printDebugInfo
=
_printDebugInfo
;
useHTTPS
=
_useHTTPS
;
autoconfirm
=
_autoconfirm
;
encryptKeys
=
_encryptKeys
;
}
inline
void
setOptions
(
int
_printDebugInfo
,
int
_useHTTPS
,
int
_autoconfirm
)
{
setFullOptions
(
_printDebugInfo
,
_useHTTPS
,
_autoconfirm
,
false
);
}
...
...
testw.cpp
View file @
77024742
...
...
@@ -46,13 +46,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <gmp.h>
#include <sgx_urts.h>
#include <stdio.h>
#include <jsonrpccpp/client/connectors/httpclient.h>
#include <sgx_tcrypto.h>
#include "BLSCrypto.h"
#include "ServerInit.h"
#include "DKGCrypto.h"
#include "RPCException.h"
#include "LevelDB.h"
#include "SGXWalletServer.hpp"
#include <sgx_tcrypto.h>
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
...
...
@@ -66,7 +69,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <thread>
#include "common.h"
#include "stubclient.h"
#include
<jsonrpccpp/client/connectors/httpclient.h>
#include
"SGXWalletServer.h"
default_random_engine
randGen
((
unsigned
int
)
time
(
0
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment