Skip to content

Commit

Permalink
removed unnecessary GOMAXPROCS function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ipriver authored and jcvernaleo committed Sep 14, 2020
1 parent ff59bbc commit 42782bb
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 15 deletions.
3 changes: 0 additions & 3 deletions blockchain/scriptval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package blockchain

import (
"fmt"
"runtime"
"testing"

"github.com/btcsuite/btcd/txscript"
Expand All @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions btcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions cmd/addblock/addblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"os"
"path/filepath"
"runtime"

"github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/blockchain/indexers"
Expand Down Expand Up @@ -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)
}
Expand Down
4 changes: 0 additions & 4 deletions database/cmd/dbtool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"os"
"path/filepath"
"runtime"
"strings"

"github.com/btcsuite/btcd/database"
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions database/ffldb/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os"
"path/filepath"
"reflect"
"runtime"
"testing"

"github.com/btcsuite/btcd/chaincfg"
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 42782bb

Please sign in to comment.