diff --git a/util/addblock/addblock.go b/util/addblock/addblock.go index fb276ce4..1ec671ae 100644 --- a/util/addblock/addblock.go +++ b/util/addblock/addblock.go @@ -18,7 +18,6 @@ import ( "os" "path/filepath" "runtime" - "runtime/pprof" ) type ShaHash btcwire.ShaHash @@ -146,26 +145,19 @@ func main() { blkP.complete <- true db.InsertBlock(blkP.blk) - if cfg.Progress && eheight%int64(1) == 0 { + if cfg.Progress && eheight%int64(10000) == 0 { log.Infof("Processing block %v", eheight) } eheight++ - - if eheight%2000 == 0 { - f, err := os.Create(fmt.Sprintf("profile.%d", eheight)) - if err == nil { - pprof.WriteHeapProfile(f) - f.Close() - } else { - log.Warnf("profile failed %v", err) - } - } } else { break } } } } + if cfg.Progress { + log.Infof("Processing block %v", eheight) + } } func processBuf(idx int, bufqueue chan *bufQueue, blkqueue chan *blkQueue) {