Skip to content

Commit

Permalink
Use shasha-s/go-deadlock for deadlock detection
Browse files Browse the repository at this point in the history
  • Loading branch information
wizeguyy authored and gameofpointers committed May 8, 2023
1 parent ad6b324 commit 9a657c5
Show file tree
Hide file tree
Showing 104 changed files with 108 additions and 102 deletions.
2 changes: 1 addition & 1 deletion build/update-license.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import (
"sort"
"strconv"
"strings"
"sync"
sync "github.com/sasha-s/go-deadlock"
"text/template"
"time"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/go-quai/test_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"os/exec"
"regexp"
"strings"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"syscall"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion common/prque/lazyqueue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package prque

import (
"math/rand"
"sync"
sync "github.com/sasha-s/go-deadlock"
"testing"
"time"

Expand Down
2 changes: 1 addition & 1 deletion common/timedcache/timedcache.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package timedcache

import (
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

lru "github.com/hashicorp/golang-lru"
Expand Down
2 changes: 1 addition & 1 deletion consensus/blake3pow/blake3pow.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package blake3pow
import (
"math/big"
"math/rand"
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion consensus/blake3pow/blake3pow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math/big"
"math/rand"
"os"
"sync"
sync "github.com/sasha-s/go-deadlock"
"testing"
"time"

Expand Down
2 changes: 1 addition & 1 deletion consensus/blake3pow/sealer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"math/rand"
"net/http"
"runtime"
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/bloombits/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"errors"
"math"
"sort"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion core/bloombits/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package bloombits

import (
"sync"
sync "github.com/sasha-s/go-deadlock"
)

// request represents a bloom retrieval task to prioritize and pull from the local
Expand Down
2 changes: 1 addition & 1 deletion core/bloombits/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"bytes"
"math/big"
"math/rand"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"testing"
"time"
Expand Down
2 changes: 1 addition & 1 deletion core/bodydb.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package core

import (
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/chain_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"encoding/binary"
"fmt"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion core/headerchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"io"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/chain_iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"math/big"
"reflect"
"sort"
"sync"
sync "github.com/sasha-s/go-deadlock"
"testing"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/freezer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"math"
"os"
"path/filepath"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/freezer_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"io"
"os"
"path/filepath"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/freezer_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"math/rand"
"os"
"path/filepath"
"sync"
sync "github.com/sasha-s/go-deadlock"
"testing"
"time"

Expand Down
2 changes: 1 addition & 1 deletion core/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"math/big"
"sync"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand All @@ -20,6 +19,7 @@ import (
"github.com/dominant-strategies/go-quai/params"
"github.com/dominant-strategies/go-quai/quaiclient"
"github.com/dominant-strategies/go-quai/trie"
sync "github.com/sasha-s/go-deadlock"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/state/snapshot/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"fmt"
"math"
"runtime"
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/state/snapshot/difflayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"math"
"math/rand"
"sort"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion core/state/snapshot/disklayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package snapshot

import (
"bytes"
"sync"
sync "github.com/sasha-s/go-deadlock"

"github.com/VictoriaMetrics/fastcache"
"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/state/snapshot/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"bytes"
"errors"
"fmt"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/state/trie_prefetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package state

import (
"sync"
sync "github.com/sasha-s/go-deadlock"

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/log"
Expand Down
2 changes: 1 addition & 1 deletion core/state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"errors"
"fmt"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/tx_noncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package core

import (
"sync"
sync "github.com/sasha-s/go-deadlock"

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/core/state"
Expand Down
2 changes: 1 addition & 1 deletion core/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"math"
"math/big"
"sort"
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package vm
import (
"fmt"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion core/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"math/big"
"sync"
"sync/atomic"
"time"

Expand All @@ -22,6 +21,7 @@ import (
"github.com/dominant-strategies/go-quai/params"
"github.com/dominant-strategies/go-quai/trie"
lru "github.com/hashicorp/golang-lru"
sync "github.com/sasha-s/go-deadlock"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package eth
import (
"fmt"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package downloader

import (
"context"
"sync"
sync "github.com/sasha-s/go-deadlock"

"github.com/dominant-strategies/go-quai"
"github.com/dominant-strategies/go-quai/event"
Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"math/big"
"strings"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"testing"
"time"
Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"errors"
"math/big"
"sort"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"math/big"
"math/rand"
"sync"
sync "github.com/sasha-s/go-deadlock"
"testing"
"time"

Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/resultstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package downloader

import (
"fmt"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"

"github.com/dominant-strategies/go-quai/common"
Expand Down
2 changes: 1 addition & 1 deletion eth/downloader/testchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package downloader
import (
"fmt"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/consensus/blake3pow"
Expand Down
2 changes: 1 addition & 1 deletion eth/fetcher/block_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package fetcher
import (
"errors"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"testing"
"time"
Expand Down
2 changes: 1 addition & 1 deletion eth/filters/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"errors"
"fmt"
"math/big"
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

ethereum "github.com/dominant-strategies/go-quai"
Expand Down
2 changes: 1 addition & 1 deletion eth/filters/filter_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package filters
import (
"context"
"fmt"
"sync"
sync "github.com/sasha-s/go-deadlock"
"time"

ethereum "github.com/dominant-strategies/go-quai"
Expand Down
2 changes: 1 addition & 1 deletion eth/gasprice/gasprice.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"math/big"
"sort"
"sync"
sync "github.com/sasha-s/go-deadlock"

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/core/types"
Expand Down
2 changes: 1 addition & 1 deletion eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"errors"
"math"
"math/rand"
"sync"
sync "github.com/sasha-s/go-deadlock"
"sync/atomic"
"time"

Expand Down
2 changes: 1 addition & 1 deletion eth/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package eth
import (
"math/big"
"sort"
"sync"
sync "github.com/sasha-s/go-deadlock"

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/consensus/blake3pow"
Expand Down
Loading

0 comments on commit 9a657c5

Please sign in to comment.