mirror of https://github.com/poanetwork/gecko.git
Fixed duplicated logging errors
This commit is contained in:
parent
9e1d24c239
commit
426fac9b10
|
@ -147,8 +147,11 @@ func (b *bootstrapper) process(vtx avalanche.Vertex) error {
|
|||
numDropped: b.numBSDroppedVtx,
|
||||
vtx: vtx,
|
||||
}); err == nil {
|
||||
b.numFetched++ // Progress tracker
|
||||
b.numBSBlockedVtx.Inc()
|
||||
b.numFetched++ // Progress tracker
|
||||
if b.numFetched%common.StatusUpdateFrequency == 0 {
|
||||
b.BootstrapConfig.Context.Log.Info("fetched %d vertices", b.numFetched)
|
||||
}
|
||||
} else {
|
||||
b.BootstrapConfig.Context.Log.Verbo("couldn't push to vtxBlocked: %s", err)
|
||||
}
|
||||
|
@ -169,10 +172,6 @@ func (b *bootstrapper) process(vtx avalanche.Vertex) error {
|
|||
}
|
||||
b.processedCache.Put(vtx.ID(), nil)
|
||||
}
|
||||
|
||||
if b.numFetched%common.StatusUpdateFrequency == 0 {
|
||||
b.BootstrapConfig.Context.Log.Info("fetched %d vertices", b.numFetched)
|
||||
}
|
||||
}
|
||||
|
||||
if err := b.VtxBlocked.Commit(); err != nil {
|
||||
|
|
|
@ -35,8 +35,8 @@ type bootstrapper struct {
|
|||
// true if all of the vertices in the original accepted frontier have been processed
|
||||
processedStartingAcceptedFrontier bool
|
||||
|
||||
// Number of blocks processed
|
||||
numProcessed uint32
|
||||
// Number of blocks fetched
|
||||
numFetched uint32
|
||||
|
||||
// tracks which validators were asked for which containers in which requests
|
||||
outstandingRequests common.Requests
|
||||
|
@ -183,16 +183,16 @@ func (b *bootstrapper) process(blk snowman.Block) error {
|
|||
status := blk.Status()
|
||||
blkID := blk.ID()
|
||||
for status == choices.Processing {
|
||||
b.numProcessed++ // Progress tracker
|
||||
if b.numProcessed%common.StatusUpdateFrequency == 0 { // Periodically print progress
|
||||
b.BootstrapConfig.Context.Log.Info("processed %d blocks", b.numProcessed)
|
||||
}
|
||||
if err := b.Blocked.Push(&blockJob{
|
||||
numAccepted: b.numBootstrapped,
|
||||
numDropped: b.numDropped,
|
||||
blk: blk,
|
||||
}); err == nil {
|
||||
b.numBlocked.Inc()
|
||||
b.numFetched++ // Progress tracker
|
||||
if b.numFetched%common.StatusUpdateFrequency == 0 { // Periodically print progress
|
||||
b.BootstrapConfig.Context.Log.Info("fetched %d blocks", b.numFetched)
|
||||
}
|
||||
}
|
||||
|
||||
if err := b.Blocked.Commit(); err != nil {
|
||||
|
|
Loading…
Reference in New Issue