remove or comment out unused code

This commit is contained in:
Anton Kaliaev
2019-02-06 15:16:38 +04:00
parent da33dd04cc
commit ffd3bf8448
10 changed files with 163 additions and 185 deletions

View File

@@ -363,23 +363,23 @@ func (pool *BlockPool) sendError(err error, peerID p2p.ID) {
pool.errorsCh <- peerError{err, peerID}
}
// unused by tendermint; left for debugging purposes
func (pool *BlockPool) debug() string {
pool.mtx.Lock()
defer pool.mtx.Unlock()
// for debugging purposes
// func (pool *BlockPool) debug() string {
// pool.mtx.Lock()
// defer pool.mtx.Unlock()
str := ""
nextHeight := pool.height + pool.requestersLen()
for h := pool.height; h < nextHeight; h++ {
if pool.requesters[h] == nil {
str += fmt.Sprintf("H(%v):X ", h)
} else {
str += fmt.Sprintf("H(%v):", h)
str += fmt.Sprintf("B?(%v) ", pool.requesters[h].block != nil)
}
}
return str
}
// str := ""
// nextHeight := pool.height + pool.requestersLen()
// for h := pool.height; h < nextHeight; h++ {
// if pool.requesters[h] == nil {
// str += fmt.Sprintf("H(%v):X ", h)
// } else {
// str += fmt.Sprintf("H(%v):", h)
// str += fmt.Sprintf("B?(%v) ", pool.requesters[h].block != nil)
// }
// }
// return str
// }
//-------------------------------------