Commit ffe662f0 authored by Richer Maximilien's avatar Richer Maximilien Committed by Loïck Bonniot

[c] Add some DLog

parent 7c6908d7
......@@ -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
......
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment