aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-01-30 11:08:52 +0800
committerMission Liao <mission.liao@dexon.org>2019-01-30 11:08:52 +0800
commitf5401fb1d4aa1f2d1d2f18eded4ffbcd68a7126f (patch)
tree4fde88453bc99984b4d03a70ada9593ca81e7b7a
parent9f76b1d335fa3ed6db013d5c17669b8371866a7a (diff)
downloaddexon-consensus-mission-vote-x.tar
dexon-consensus-mission-vote-x.tar.gz
dexon-consensus-mission-vote-x.tar.bz2
dexon-consensus-mission-vote-x.tar.lz
dexon-consensus-mission-vote-x.tar.xz
dexon-consensus-mission-vote-x.tar.zst
dexon-consensus-mission-vote-x.zip
Fixup: upgrade logger level to debugmission-vote-x
-rw-r--r--core/agreement.go8
-rw-r--r--core/syncer/consensus.go16
2 files changed, 12 insertions, 12 deletions
diff --git a/core/agreement.go b/core/agreement.go
index e26361b..428da68 100644
--- a/core/agreement.go
+++ b/core/agreement.go
@@ -154,7 +154,7 @@ func newAgreement(
// restart the agreement
func (a *agreement) restart(
aID types.Position, leader types.NodeID, crs common.Hash) {
- a.logger.Trace("restart agreement", "pos", &aID, "leader", leader.String()[:6], "crs", crs.String()[:6])
+ a.logger.Debug("restart agreement", "pos", &aID, "leader", leader.String()[:6], "crs", crs.String()[:6])
if !func() bool {
a.lock.Lock()
defer a.lock.Unlock()
@@ -346,18 +346,18 @@ func (a *agreement) processSignal(signal *agrPkg.Signal) error {
if signal.Position.Height == 0 {
a.pendingSignal = append(a.pendingSignal, signal)
}
- a.logger.Trace("Dropping signal when stopped", "signal", signal)
+ a.logger.Debug("Dropping signal when stopped", "signal", signal)
return nil
}
if signal.Position != aID {
if aID.Newer(&signal.Position) {
- a.logger.Trace("Dropping older stopped", "signal", signal)
+ a.logger.Debug("Dropping older stopped", "signal", signal)
return nil
}
a.pendingSignal = append(a.pendingSignal, signal)
return nil
}
- a.logger.Trace("ProcessSignal", "signal", signal)
+ a.logger.Debug("ProcessSignal", "signal", signal)
if a.hasOutput {
return nil
}
diff --git a/core/syncer/consensus.go b/core/syncer/consensus.go
index 2c84d84..087340c 100644
--- a/core/syncer/consensus.go
+++ b/core/syncer/consensus.go
@@ -393,7 +393,7 @@ func (con *Consensus) processFinalizedBlock(block *types.Block) error {
if con.lattice == nil {
return nil
}
- con.logger.Trace("syncer process finalized block", "block", block)
+ con.logger.Debug("syncer process finalized block", "block", block)
delivered, err := con.lattice.ProcessFinalizedBlock(block)
if err != nil {
return err
@@ -402,7 +402,7 @@ func (con *Consensus) processFinalizedBlock(block *types.Block) error {
defer con.lock.Unlock()
con.finalizedBlockHashes = append(con.finalizedBlockHashes, block.Hash)
for idx, b := range delivered {
- con.logger.Trace("syncer block devliered", "block", b)
+ con.logger.Debug("syncer block devliered", "block", b)
if con.finalizedBlockHashes[idx] != b.Hash {
return ErrMismatchBlockHashSequence
}
@@ -450,7 +450,7 @@ func (con *Consensus) SyncBlocks(
err = ErrInvalidSyncingFinalizationHeight
return
}
- con.logger.Trace("syncBlocks",
+ con.logger.Debug("syncBlocks",
"position", &blocks[0].Position,
"final height", blocks[0].Finalization.Height,
"len", len(blocks),
@@ -583,15 +583,15 @@ func (con *Consensus) GetSyncedConsensus() (*core.Consensus, error) {
// This method is mainly for caller to stop the syncer before synced, the syncer
// would call this method automatically after being synced.
func (con *Consensus) Stop() error {
- con.logger.Trace("syncer is about to stop")
+ con.logger.Debug("syncer is about to stop")
// Stop network and CRS routines, wait until they are all stoped.
con.ctxCancel()
- con.logger.Trace("stop syncer modules")
+ con.logger.Debug("stop syncer modules")
con.moduleWaitGroup.Wait()
// Stop agreements.
- con.logger.Trace("stop syncer agreement modules")
+ con.logger.Debug("stop syncer agreement modules")
con.stopAgreement()
- con.logger.Trace("syncer stopped")
+ con.logger.Debug("syncer stopped")
return nil
}
@@ -643,7 +643,7 @@ func (con *Consensus) setupConfigsUntilRound(round uint64) {
}
}()
con.resizeByNumChains(curMaxNumChains)
- con.logger.Trace("setupConfgis finished", "round", round)
+ con.logger.Debug("setupConfgis finished", "round", round)
}
// setupConfigs is called by SyncBlocks with blocks from compaction chain. In