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
11917044
Unverified
Commit
11917044
authored
Aug 02, 2021
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-4262 write key owner to db
parent
a9769d90
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
testw.cpp
testw.cpp
+3
-3
testw.py
testw.py
+0
-1
ZMQMessage.cpp
zmq_src/ZMQMessage.cpp
+2
-2
No files found.
testw.cpp
View file @
11917044
...
@@ -73,7 +73,7 @@ public:
...
@@ -73,7 +73,7 @@ public:
TestFixture
()
{
TestFixture
()
{
TestUtils
::
resetDB
();
TestUtils
::
resetDB
();
setOptions
(
L_INFO
,
false
,
true
);
setOptions
(
L_INFO
,
false
,
true
);
initAll
(
L_INFO
,
false
,
false
,
true
,
false
,
fals
e
);
initAll
(
L_INFO
,
false
,
false
,
true
,
false
,
tru
e
);
}
}
~
TestFixture
()
{
~
TestFixture
()
{
...
@@ -114,7 +114,7 @@ class TestFixtureNoResetFromBackup {
...
@@ -114,7 +114,7 @@ class TestFixtureNoResetFromBackup {
public
:
public
:
TestFixtureNoResetFromBackup
()
{
TestFixtureNoResetFromBackup
()
{
setFullOptions
(
L_INFO
,
false
,
true
,
true
);
setFullOptions
(
L_INFO
,
false
,
true
,
true
);
initAll
(
L_INFO
,
false
,
false
,
true
,
false
,
fals
e
);
initAll
(
L_INFO
,
false
,
false
,
true
,
false
,
tru
e
);
}
}
~
TestFixtureNoResetFromBackup
()
{
~
TestFixtureNoResetFromBackup
()
{
...
@@ -128,7 +128,7 @@ class TestFixtureNoReset {
...
@@ -128,7 +128,7 @@ class TestFixtureNoReset {
public
:
public
:
TestFixtureNoReset
()
{
TestFixtureNoReset
()
{
setOptions
(
L_INFO
,
false
,
true
);
setOptions
(
L_INFO
,
false
,
true
);
initAll
(
L_INFO
,
false
,
false
,
true
,
false
,
fals
e
);
initAll
(
L_INFO
,
false
,
false
,
true
,
false
,
tru
e
);
}
}
~
TestFixtureNoReset
()
{
~
TestFixtureNoReset
()
{
...
...
testw.py
View file @
11917044
...
@@ -55,7 +55,6 @@ testList = [ "[zmq-ecdsa]",
...
@@ -55,7 +55,6 @@ testList = [ "[zmq-ecdsa]",
"[dkg-api-v2]"
,
"[dkg-api-v2]"
,
"[dkg-api-v2-zmq]"
,
"[dkg-api-v2-zmq]"
,
"[dkg-bls]"
,
"[dkg-bls]"
,
"[dkgzmqbls]"
,
"[dkg-bls-v2]"
,
"[dkg-bls-v2]"
,
"[dkg-poly-exists]"
,
"[dkg-poly-exists]"
,
"[dkg-poly-exists-zmq]"
,
"[dkg-poly-exists-zmq]"
,
...
...
zmq_src/ZMQMessage.cpp
View file @
11917044
...
@@ -320,12 +320,12 @@ shared_ptr <ZMQMessage> ZMQMessage::buildResponse(string &_type, shared_ptr <rap
...
@@ -320,12 +320,12 @@ shared_ptr <ZMQMessage> ZMQMessage::buildResponse(string &_type, shared_ptr <rap
std
::
map
<
string
,
string
>
ZMQMessage
::
keysByOwners
;
std
::
map
<
string
,
string
>
ZMQMessage
::
keysByOwners
;
bool
ZMQMessage
::
isKeyByOwner
(
const
string
&
keyName
,
const
string
&
cert
)
{
bool
ZMQMessage
::
isKeyByOwner
(
const
string
&
keyName
,
const
string
&
cert
)
{
auto
value
=
LevelDB
::
getLevelDb
()
->
readString
(
keyName
);
auto
value
=
LevelDB
::
getLevelDb
()
->
readString
(
keyName
+
":OWNER"
);
return
value
&&
*
value
==
cert
;
return
value
&&
*
value
==
cert
;
}
}
void
ZMQMessage
::
addKeyByOwner
(
const
string
&
keyName
,
const
string
&
cert
)
{
void
ZMQMessage
::
addKeyByOwner
(
const
string
&
keyName
,
const
string
&
cert
)
{
SGXWalletServer
::
writeDataToDB
(
keyName
,
cert
);
SGXWalletServer
::
writeDataToDB
(
keyName
+
":OWNER"
,
cert
);
}
}
cache
::
lru_cache
<
string
,
pair
<
EVP_PKEY
*
,
X509
*>>
ZMQMessage
::
verifiedCerts
(
256
);
cache
::
lru_cache
<
string
,
pair
<
EVP_PKEY
*
,
X509
*>>
ZMQMessage
::
verifiedCerts
(
256
);
...
...
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