Skip to content

Commit

Permalink
Revert "Use shasha-s/go-deadlock for deadlock detection"
Browse files Browse the repository at this point in the history
This reverts commit 9a657c5.
  • Loading branch information
gameofpointers committed Jun 2, 2023
1 parent 592b61e commit e1af545
Show file tree
Hide file tree
Showing 101 changed files with 106 additions and 138 deletions.
3 changes: 1 addition & 2 deletions build/update-license.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ import (
"sort"
"strconv"
"strings"
"sync"
"text/template"
"time"

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

var (
Expand Down
3 changes: 1 addition & 2 deletions cmd/go-quai/test_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ import (
"os/exec"
"regexp"
"strings"
"sync"
"sync/atomic"
"syscall"
"testing"
"text/template"
"time"

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

"github.com/docker/docker/pkg/reexec"
)

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 "github.com/sasha-s/go-deadlock"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"
"time"

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

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

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

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

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/common/hexutil"
"github.com/dominant-strategies/go-quai/core/types"
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 "github.com/sasha-s/go-deadlock"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"
)

// 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 "github.com/sasha-s/go-deadlock"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"
"time"

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

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

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/core/rawdb"
"github.com/dominant-strategies/go-quai/core/types"
Expand Down
2 changes: 1 addition & 1 deletion core/headerchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package core
import (
"errors"
"fmt"
sync "github.com/sasha-s/go-deadlock"
"io"
"math/big"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"
"testing"

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

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

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/ethdb"
"github.com/dominant-strategies/go-quai/log"
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 "github.com/sasha-s/go-deadlock"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"
"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,6 +6,7 @@ import (
"errors"
"fmt"
"math/big"
"sync"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand All @@ -20,7 +21,6 @@ import (
"github.com/dominant-strategies/go-quai/quaiclient"
"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 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 "github.com/sasha-s/go-deadlock"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"
"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 "github.com/sasha-s/go-deadlock"
"sync"

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

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

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/core/rawdb"
"github.com/dominant-strategies/go-quai/ethdb"
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 "github.com/sasha-s/go-deadlock"
"sync"

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

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

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

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

"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,6 +22,7 @@ import (
"math"
"math/big"
"sort"
"sync"
"time"

"github.com/dominant-strategies/go-quai/common"
Expand All @@ -33,7 +34,6 @@ import (
"github.com/dominant-strategies/go-quai/log"
"github.com/dominant-strategies/go-quai/metrics"
"github.com/dominant-strategies/go-quai/params"
sync "github.com/sasha-s/go-deadlock"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions core/vm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ package vm
import (
"fmt"
"math/big"
"sync"
"sync/atomic"
"time"

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

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

Expand All @@ -21,7 +22,6 @@ 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
3 changes: 1 addition & 2 deletions eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ import (
"fmt"
"math/big"
"net/http"
"sync"
"sync/atomic"
"time"

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

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/consensus"
"github.com/dominant-strategies/go-quai/core"
Expand Down
3 changes: 1 addition & 2 deletions eth/downloader/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ package downloader

import (
"context"

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

interfaces "github.com/dominant-strategies/go-quai"
"github.com/dominant-strategies/go-quai/event"
Expand Down
10 changes: 4 additions & 6 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ package downloader
import (
"errors"
"fmt"
"math/big"
"sync/atomic"
"time"

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

quai "github.com/dominant-strategies/go-quai"
"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/consensus"
Expand All @@ -36,6 +30,10 @@ import (
"github.com/dominant-strategies/go-quai/event"
"github.com/dominant-strategies/go-quai/log"
"github.com/dominant-strategies/go-quai/metrics"
"math/big"
"sync"
"sync/atomic"
"time"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions eth/downloader/downloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ import (
"fmt"
"math/big"
"strings"
"sync"
"sync/atomic"
"testing"
"time"

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

quai "github.com/dominant-strategies/go-quai"
"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/core/rawdb"
Expand Down
3 changes: 1 addition & 2 deletions eth/downloader/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ import (
"errors"
"math/big"
"sort"
"sync"
"sync/atomic"
"time"

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

"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/eth/protocols/eth"
"github.com/dominant-strategies/go-quai/event"
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 "github.com/sasha-s/go-deadlock"
"sync"
"testing"
"time"

Expand Down
Loading

0 comments on commit e1af545

Please sign in to comment.