Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpcs
dfss
Commits
ffe662f0
Commit
ffe662f0
authored
Mar 28, 2016
by
Richer Maximilien
Committed by
Loïck Bonniot
Apr 15, 2016
Browse files
[c] Add some DLog
parent
7c6908d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
dfssc/sign/protocol.go
View file @
ffe662f0
...
...
@@ -2,9 +2,11 @@ package sign
import
(
"fmt"
"log"
cAPI
"dfss/dfssc/api"
"dfss/dfssc/common"
dAPI
"dfss/dfssd/api"
)
var
(
...
...
@@ -36,6 +38,9 @@ func (m *SignatureManager) Sign() error {
// Follow the sequence until there is no next occurence of me
for
nextIndex
>
0
{
dAPI
.
DLog
(
"Starting round at index ["
+
fmt
.
Sprintf
(
"%d"
,
m
.
currentIndex
)
+
"]"
)
log
.
Println
(
"Starting round at index ["
+
fmt
.
Sprintf
(
"%d"
,
m
.
currentIndex
)
+
"]"
)
// Set of the promise we are waiting for
pendingSet
,
err1
:=
common
.
GetPendingSet
(
m
.
sequence
,
myID
,
m
.
currentIndex
)
if
err1
!=
nil
{
...
...
@@ -107,6 +112,7 @@ func (m *SignatureManager) promiseRound(pendingSet, sendSet []uint32, myID uint3
if
err
!=
nil
{
// Recieve unexpected promise, ignore ?
}
dAPI
.
DLog
(
"Recieved promise from ["
+
fmt
.
Sprintf
(
"%d"
,
senderID
)
+
"]"
)
m
.
archives
.
recievedPromises
=
append
(
m
.
archives
.
recievedPromises
,
promise
)
}
else
{
// Wrong sender keyHash
...
...
tests/starters_test.go
View file @
ffe662f0
...
...
@@ -89,7 +89,7 @@ func createClient(tmpDir string, ca []byte, port int) (*exec.Cmd, error) {
// Prepare the client command.
// The last argument is up to you!
cmd
:=
exec
.
Command
(
path
,
"-ca"
,
caPath
,
"-cert"
,
certPath
,
"-host"
,
"127.0.0.1:"
+
testPort
,
"-key"
,
keyPath
,
"-port"
,
strconv
.
Itoa
(
port
),
"-v"
)
cmd
:=
exec
.
Command
(
path
,
"-ca"
,
caPath
,
"-cert"
,
certPath
,
"-host"
,
"127.0.0.1:"
+
testPort
,
"-key"
,
keyPath
,
"-port"
,
strconv
.
Itoa
(
port
),
"-v"
,
"-d"
)
return
cmd
,
nil
}
...
...
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