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
0cdc1c7b
Unverified
Commit
0cdc1c7b
authored
Jun 29, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2835 fix build
parent
633956d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
20 deletions
+6
-20
LevelDB.cpp
LevelDB.cpp
+0
-11
LevelDB.h
LevelDB.h
+0
-2
SGXWalletServer.cpp
SGXWalletServer.cpp
+5
-5
abstractstubserver.h
abstractstubserver.h
+1
-2
No files found.
LevelDB.cpp
View file @
0cdc1c7b
...
...
@@ -113,17 +113,6 @@ void LevelDB::deleteKey(const string &_key) {
spdlog
::
debug
(
"key deleted: {}"
,
_key
);
}
void
LevelDB
::
deleteDkgPoly
(
const
std
::
string
&
name
)
{
std
::
lock_guard
<
std
::
recursive_mutex
>
lock
(
mutex
);
auto
status
=
db
->
Delete
(
writeOptions
,
Slice
(
name
));
throwExceptionOnError
(
status
);
spdlog
::
debug
(
"key deleted: {}"
,
name
);
}
void
LevelDB
::
writeByteArray
(
const
char
*
_key
,
size_t
_keyLen
,
const
char
*
value
,
size_t
_valueLen
)
{
...
...
LevelDB.h
View file @
0cdc1c7b
...
...
@@ -87,8 +87,6 @@ public:
void
deleteKey
(
const
string
&
_key
);
void
deleteDkgPoly
(
const
std
::
string
&
name
);
public
:
...
...
SGXWalletServer.cpp
View file @
0cdc1c7b
...
...
@@ -569,7 +569,7 @@ SGXWalletServer::createBLSPrivateKeyImpl(const string &_blsKeyName, const string
LevelDB
::
getLevelDb
()
->
deleteDHDKGKey
(
name
);
string
shareG2_name
=
"shareG2_"
+
_polyName
+
"_"
+
to_string
(
i
)
+
":"
;
LevelDB
::
getLevelDb
()
->
deleteKey
(
shareG2_name
);
LevelDB
::
getLevelDb
()
->
delete
DkgPoly
(
_polyName
`
);
LevelDB
::
getLevelDb
()
->
delete
Key
(
_polyName
);
}
}
HANDLE_SGX_EXCEPTION
(
result
)
...
...
@@ -666,10 +666,10 @@ Json::Value SGXWalletServer::deleteBlsKeyImpl(const std::string& name) {
result
[
"deleted"
]
=
false
;
try
{
if
(
!
checkName
(
_blsKeyN
ame
,
"BLS_KEY"
))
{
if
(
!
checkName
(
n
ame
,
"BLS_KEY"
))
{
throw
SGXException
(
INVALID_BLS_NAME
,
"Invalid BLSKey name"
);
}
LevelDB
::
getLevelDb
()
->
delete
Bls
Key
(
name
);
LevelDB
::
getLevelDb
()
->
deleteKey
(
name
);
}
HANDLE_SGX_EXCEPTION
(
result
)
return
result
;
}
...
...
@@ -777,9 +777,9 @@ Json::Value SGXWalletServer::getServerVersion() {
return
getServerVersionImpl
();
}
Json
::
Value
SGXWalletServer
::
deleteBlsKey
()
{
Json
::
Value
SGXWalletServer
::
deleteBlsKey
(
const
std
::
string
&
name
)
{
READ_LOCK
(
m
)
return
deleteBlsKeyImpl
();
return
deleteBlsKeyImpl
(
name
);
}
shared_ptr
<
string
>
SGXWalletServer
::
readFromDb
(
const
string
&
name
,
const
string
&
prefix
)
{
...
...
abstractstubserver.h
View file @
0cdc1c7b
...
...
@@ -141,7 +141,7 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
response
=
this
->
getServerVersion
();
}
inline
virtual
deleteBlsKeyI
(
const
Json
::
Value
&
request
,
Json
::
Value
&
response
)
{
inline
virtual
void
deleteBlsKeyI
(
const
Json
::
Value
&
request
,
Json
::
Value
&
response
)
{
response
=
this
->
deleteBlsKey
(
request
[
"blsKeyName"
].
asString
());
}
...
...
@@ -166,7 +166,6 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
virtual
Json
::
Value
getServerStatus
()
=
0
;
virtual
Json
::
Value
getServerVersion
()
=
0
;
virtual
Json
::
Value
deleteBlsKey
(
const
std
::
string
&
name
)
=
0
;
virtual
Json
::
Value
deleteBlsKey
(
const
std
::
string
&
name
)
=
0
;
};
#endif //JSONRPC_CPP_STUB_ABSTRACTSTUBSERVER_H_
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