aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/agreement.go2
-rw-r--r--core/consensus.go1
-rw-r--r--core/types/node.go5
3 files changed, 8 insertions, 0 deletions
diff --git a/core/agreement.go b/core/agreement.go
index d4f1bbd..6727ecb 100644
--- a/core/agreement.go
+++ b/core/agreement.go
@@ -171,6 +171,8 @@ func (a *agreement) restart(
return false
}
}
+ a.logger.Debug("Restarting BA",
+ "notarySet", notarySet, "position", aID, "leader", leader)
a.data.lock.Lock()
defer a.data.lock.Unlock()
a.data.blocksLock.Lock()
diff --git a/core/consensus.go b/core/consensus.go
index a02f8c1..19ba74c 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -391,6 +391,7 @@ CleanChannelLoop:
}
newPos := block.Position
if block.Position.Height+1 == recv.changeNotaryHeight() {
+ recv.consensus.logger.Info("Round will change", "block", block)
newPos.Round++
recv.updateRound(newPos.Round)
}
diff --git a/core/types/node.go b/core/types/node.go
index 2c90f65..18b6831 100644
--- a/core/types/node.go
+++ b/core/types/node.go
@@ -19,6 +19,7 @@ package types
import (
"bytes"
+ "encoding/hex"
"github.com/dexon-foundation/dexon-consensus/common"
"github.com/dexon-foundation/dexon-consensus/core/crypto"
@@ -40,6 +41,10 @@ func (v NodeID) Equal(v2 NodeID) bool {
return v.Hash == v2.Hash
}
+func (v NodeID) String() string {
+ return hex.EncodeToString(v.Hash[:])[:6]
+}
+
// NodeIDs implements sort.Interface for NodeID.
type NodeIDs []NodeID