diff --git a/consensus/eccpow/algorithm.go b/consensus/eccpow/algorithm.go index c4eed548..bdb1fdee 100644 --- a/consensus/eccpow/algorithm.go +++ b/consensus/eccpow/algorithm.go @@ -194,6 +194,7 @@ outerLoop: close(goRoutineSignal) close(innerLoopSignal) fmt.Printf("Codeword is founded with nonce = %d\n", goRoutineNonce) + fmt.Printf("Codeword : %d\n", goRoutineOutputWord) hashVector = goRoutineHashVector outputWord = goRoutineOutputWord LDPCNonce = goRoutineNonce diff --git a/miner/worker.go b/miner/worker.go index aec928f5..05dea7f8 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -18,10 +18,8 @@ package miner import ( "bytes" - "encoding/csv" "errors" "math/big" - "os" "sync" "sync/atomic" "time" @@ -599,12 +597,13 @@ func (w *worker) resultLoop() { log.Info("Successfully sealed new block", "number", block.Number(), "sealhash", sealhash, "hash", hash, "elapsed", common.PrettyDuration(time.Since(task.createdAt))) - csvFile, _ := os.OpenFile("elapseTime.csv", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) - - wr := csv.NewWriter(csvFile) - wr.Write([]string{block.Number().String(), time.Since(task.createdAt).String()}) - wr.Flush() + /* + csvFile, _ := os.OpenFile("elapseTime.csv", os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644) + wr := csv.NewWriter(csvFile) + wr.Write([]string{block.Number().String(), time.Since(task.createdAt).String()}) + wr.Flush() + */ // Broadcast the block and announce chain insertion event w.mux.Post(core.NewMinedBlockEvent{Block: block})