diff --git a/blockchain/scriptval_test.go b/blockchain/scriptval_test.go index 56450b7a03..031f04801f 100644 --- a/blockchain/scriptval_test.go +++ b/blockchain/scriptval_test.go @@ -6,7 +6,6 @@ package blockchain import ( "fmt" - "runtime" "testing" "github.com/btcsuite/btcd/txscript" @@ -15,8 +14,6 @@ import ( // TestCheckBlockScripts ensures that validating the all of the scripts in a // known-good block doesn't return an error. func TestCheckBlockScripts(t *testing.T) { - runtime.GOMAXPROCS(runtime.NumCPU()) - testBlockNum := 277647 blockDataFile := fmt.Sprintf("%d.dat.bz2", testBlockNum) blocks, err := loadBlocks(blockDataFile) diff --git a/btcd.go b/btcd.go index c17d6ab48a..3ace182cd8 100644 --- a/btcd.go +++ b/btcd.go @@ -297,9 +297,6 @@ func loadBlockDB() (database.DB, error) { } func main() { - // Use all processor cores. - runtime.GOMAXPROCS(runtime.NumCPU()) - // Block and transaction processing can cause bursty allocations. This // limits the garbage collector from excessively overallocating during // bursts. This value was arrived at with the help of profiling live diff --git a/cmd/addblock/addblock.go b/cmd/addblock/addblock.go index 15b61b6880..8b44f307e4 100644 --- a/cmd/addblock/addblock.go +++ b/cmd/addblock/addblock.go @@ -7,7 +7,6 @@ package main import ( "os" "path/filepath" - "runtime" "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/blockchain/indexers" @@ -119,8 +118,7 @@ func realMain() error { } func main() { - // Use all processor cores and up some limits. - runtime.GOMAXPROCS(runtime.NumCPU()) + // up some limits. if err := limits.SetLimits(); err != nil { os.Exit(1) } diff --git a/database/cmd/dbtool/main.go b/database/cmd/dbtool/main.go index 9eccd5989b..73c59a6e7d 100644 --- a/database/cmd/dbtool/main.go +++ b/database/cmd/dbtool/main.go @@ -7,7 +7,6 @@ package main import ( "os" "path/filepath" - "runtime" "strings" "github.com/btcsuite/btcd/database" @@ -106,9 +105,6 @@ func realMain() error { } func main() { - // Use all processor cores. - runtime.GOMAXPROCS(runtime.NumCPU()) - // Work around defer not working after os.Exit() if err := realMain(); err != nil { os.Exit(1) diff --git a/database/ffldb/driver_test.go b/database/ffldb/driver_test.go index 8ba6691af3..f3db909d79 100644 --- a/database/ffldb/driver_test.go +++ b/database/ffldb/driver_test.go @@ -9,7 +9,6 @@ import ( "os" "path/filepath" "reflect" - "runtime" "testing" "github.com/btcsuite/btcd/chaincfg" @@ -278,7 +277,6 @@ func TestInterface(t *testing.T) { } // Run all of the interface tests against the database. - runtime.GOMAXPROCS(runtime.NumCPU()) // Change the maximum file size to a small value to force multiple flat // files with the test data set.