Optimisations and fixed a couple of DDOS issues in the miner

This commit is contained in:
obscuren
2015-02-19 22:33:22 +01:00
parent c14071df9d
commit fa4cbad315
15 changed files with 156 additions and 104 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"math/big"
"runtime"
"time"
)
func IsWindows() bool {
@ -86,3 +87,9 @@ var (
Big256 = big.NewInt(0xff)
Big257 = big.NewInt(257)
)
func Bench(pre string, cb func()) {
start := time.Now()
cb()
fmt.Println(pre, ": took:", time.Since(start))
}