From 96ded50f6b022f9ccf5b6571ee462ebc859d41b3 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Tue, 7 Jan 2014 15:39:38 -0600 Subject: [PATCH] Dont write pprof info in addblock. dont write pprof info in addblock (ok drahn); and make progress a little more silent --- util/addblock/addblock.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/util/addblock/addblock.go b/util/addblock/addblock.go index fb276ce44..1ec671aef 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) {