Skip to content

Commit e1af545

Browse files
Revert "Use shasha-s/go-deadlock for deadlock detection"
This reverts commit 9a657c5.
1 parent 592b61e commit e1af545

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+106
-138
lines changed

build/update-license.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ import (
5050
"sort"
5151
"strconv"
5252
"strings"
53+
"sync"
5354
"text/template"
5455
"time"
55-
56-
sync "github.com/sasha-s/go-deadlock"
5756
)
5857

5958
var (

cmd/go-quai/test_cmd.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ import (
2626
"os/exec"
2727
"regexp"
2828
"strings"
29+
"sync"
2930
"sync/atomic"
3031
"syscall"
3132
"testing"
3233
"text/template"
3334
"time"
3435

35-
sync "github.com/sasha-s/go-deadlock"
36-
3736
"github.com/docker/docker/pkg/reexec"
3837
)
3938

common/prque/lazyqueue_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package prque
1818

1919
import (
2020
"math/rand"
21-
sync "github.com/sasha-s/go-deadlock"
21+
"sync"
2222
"testing"
2323
"time"
2424

common/timedcache/timedcache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package timedcache
22

33
import (
4-
sync "github.com/sasha-s/go-deadlock"
4+
"sync"
55
"time"
66

77
lru "github.com/hashicorp/golang-lru"

consensus/blake3pow/blake3pow.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ package blake3pow
33
import (
44
"math/big"
55
"math/rand"
6+
"sync"
67
"time"
78

8-
sync "github.com/sasha-s/go-deadlock"
9-
109
"github.com/dominant-strategies/go-quai/common"
1110
"github.com/dominant-strategies/go-quai/common/hexutil"
1211
"github.com/dominant-strategies/go-quai/consensus"

consensus/blake3pow/blake3pow_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import (
55
"math/big"
66
"math/rand"
77
"os"
8+
"sync"
89
"testing"
910
"time"
1011

11-
sync "github.com/sasha-s/go-deadlock"
12-
1312
"github.com/dominant-strategies/go-quai/common"
1413
"github.com/dominant-strategies/go-quai/common/hexutil"
1514
"github.com/dominant-strategies/go-quai/core/types"

consensus/blake3pow/sealer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"math/rand"
1212
"net/http"
1313
"runtime"
14-
sync "github.com/sasha-s/go-deadlock"
14+
"sync"
1515
"time"
1616

1717
"github.com/dominant-strategies/go-quai/common"

core/bloombits/matcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"errors"
2323
"math"
2424
"sort"
25-
sync "github.com/sasha-s/go-deadlock"
25+
"sync"
2626
"sync/atomic"
2727
"time"
2828

core/bloombits/scheduler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package bloombits
1818

1919
import (
20-
sync "github.com/sasha-s/go-deadlock"
20+
"sync"
2121
)
2222

2323
// request represents a bloom retrieval task to prioritize and pull from the local

core/bloombits/scheduler_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"bytes"
2121
"math/big"
2222
"math/rand"
23-
sync "github.com/sasha-s/go-deadlock"
23+
"sync"
2424
"sync/atomic"
2525
"testing"
2626
"time"

core/bodydb.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package core
22

33
import (
4-
sync "github.com/sasha-s/go-deadlock"
4+
"sync"
55
"time"
66

77
"github.com/dominant-strategies/go-quai/common"

core/chain_indexer.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ import (
2020
"context"
2121
"encoding/binary"
2222
"fmt"
23+
"sync"
2324
"sync/atomic"
2425
"time"
2526

26-
sync "github.com/sasha-s/go-deadlock"
27-
2827
"github.com/dominant-strategies/go-quai/common"
2928
"github.com/dominant-strategies/go-quai/core/rawdb"
3029
"github.com/dominant-strategies/go-quai/core/types"

core/headerchain.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package core
33
import (
44
"errors"
55
"fmt"
6-
sync "github.com/sasha-s/go-deadlock"
76
"io"
87
"math/big"
8+
"sync"
99
"sync/atomic"
1010
"time"
1111

core/rawdb/chain_iterator_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"math/big"
2121
"reflect"
2222
"sort"
23-
sync "github.com/sasha-s/go-deadlock"
23+
"sync"
2424
"testing"
2525

2626
"github.com/dominant-strategies/go-quai/common"

core/rawdb/freezer.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ import (
2222
"math"
2323
"os"
2424
"path/filepath"
25+
"sync"
2526
"sync/atomic"
2627
"time"
2728

28-
sync "github.com/sasha-s/go-deadlock"
29-
3029
"github.com/dominant-strategies/go-quai/common"
3130
"github.com/dominant-strategies/go-quai/ethdb"
3231
"github.com/dominant-strategies/go-quai/log"

core/rawdb/freezer_table.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"io"
2424
"os"
2525
"path/filepath"
26-
sync "github.com/sasha-s/go-deadlock"
26+
"sync"
2727
"sync/atomic"
2828

2929
"github.com/dominant-strategies/go-quai/common"

core/rawdb/freezer_table_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"math/rand"
2525
"os"
2626
"path/filepath"
27-
sync "github.com/sasha-s/go-deadlock"
27+
"sync"
2828
"testing"
2929
"time"
3030

core/slice.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"errors"
77
"fmt"
88
"math/big"
9+
"sync"
910
"time"
1011

1112
"github.com/dominant-strategies/go-quai/common"
@@ -20,7 +21,6 @@ import (
2021
"github.com/dominant-strategies/go-quai/quaiclient"
2122
"github.com/dominant-strategies/go-quai/trie"
2223
lru "github.com/hashicorp/golang-lru"
23-
sync "github.com/sasha-s/go-deadlock"
2424
)
2525

2626
const (

core/state/snapshot/conversion.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"fmt"
2424
"math"
2525
"runtime"
26-
sync "github.com/sasha-s/go-deadlock"
26+
"sync"
2727
"time"
2828

2929
"github.com/dominant-strategies/go-quai/common"

core/state/snapshot/difflayer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"math"
2323
"math/rand"
2424
"sort"
25-
sync "github.com/sasha-s/go-deadlock"
25+
"sync"
2626
"sync/atomic"
2727
"time"
2828

core/state/snapshot/disklayer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package snapshot
1818

1919
import (
2020
"bytes"
21-
sync "github.com/sasha-s/go-deadlock"
21+
"sync"
2222

2323
"github.com/VictoriaMetrics/fastcache"
2424
"github.com/dominant-strategies/go-quai/common"

core/state/snapshot/snapshot.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ import (
2121
"bytes"
2222
"errors"
2323
"fmt"
24+
"sync"
2425
"sync/atomic"
2526

26-
sync "github.com/sasha-s/go-deadlock"
27-
2827
"github.com/dominant-strategies/go-quai/common"
2928
"github.com/dominant-strategies/go-quai/core/rawdb"
3029
"github.com/dominant-strategies/go-quai/ethdb"

core/state/trie_prefetcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package state
1818

1919
import (
20-
sync "github.com/sasha-s/go-deadlock"
20+
"sync"
2121

2222
"github.com/dominant-strategies/go-quai/common"
2323
"github.com/dominant-strategies/go-quai/log"

core/state_processor.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ import (
2020
"errors"
2121
"fmt"
2222
"math/big"
23+
"sync"
2324
"time"
2425

25-
sync "github.com/sasha-s/go-deadlock"
26-
2726
"github.com/dominant-strategies/go-quai/common"
2827
"github.com/dominant-strategies/go-quai/common/prque"
2928
"github.com/dominant-strategies/go-quai/consensus"

core/tx_noncer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package core
1818

1919
import (
2020
lru "github.com/hashicorp/golang-lru"
21-
sync "github.com/sasha-s/go-deadlock"
21+
"sync"
2222

2323
"github.com/dominant-strategies/go-quai/common"
2424
"github.com/dominant-strategies/go-quai/core/state"

core/tx_pool.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"math"
2323
"math/big"
2424
"sort"
25+
"sync"
2526
"time"
2627

2728
"github.com/dominant-strategies/go-quai/common"
@@ -33,7 +34,6 @@ import (
3334
"github.com/dominant-strategies/go-quai/log"
3435
"github.com/dominant-strategies/go-quai/metrics"
3536
"github.com/dominant-strategies/go-quai/params"
36-
sync "github.com/sasha-s/go-deadlock"
3737
)
3838

3939
const (

core/vm/evm.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ package vm
1919
import (
2020
"fmt"
2121
"math/big"
22+
"sync"
2223
"sync/atomic"
2324
"time"
2425

25-
sync "github.com/sasha-s/go-deadlock"
26-
2726
"github.com/dominant-strategies/go-quai/common"
2827
"github.com/dominant-strategies/go-quai/core/types"
2928
"github.com/dominant-strategies/go-quai/crypto"

core/worker.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"errors"
55
"fmt"
66
"math/big"
7+
"sync"
78
"sync/atomic"
89
"time"
910

@@ -21,7 +22,6 @@ import (
2122
"github.com/dominant-strategies/go-quai/params"
2223
"github.com/dominant-strategies/go-quai/trie"
2324
lru "github.com/hashicorp/golang-lru"
24-
sync "github.com/sasha-s/go-deadlock"
2525
)
2626

2727
const (

eth/backend.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ import (
2222
"fmt"
2323
"math/big"
2424
"net/http"
25+
"sync"
2526
"sync/atomic"
2627
"time"
2728

28-
sync "github.com/sasha-s/go-deadlock"
29-
3029
"github.com/dominant-strategies/go-quai/common"
3130
"github.com/dominant-strategies/go-quai/consensus"
3231
"github.com/dominant-strategies/go-quai/core"

eth/downloader/api.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ package downloader
1818

1919
import (
2020
"context"
21-
22-
sync "github.com/sasha-s/go-deadlock"
21+
"sync"
2322

2423
interfaces "github.com/dominant-strategies/go-quai"
2524
"github.com/dominant-strategies/go-quai/event"

eth/downloader/downloader.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ package downloader
2020
import (
2121
"errors"
2222
"fmt"
23-
"math/big"
24-
"sync/atomic"
25-
"time"
26-
27-
sync "github.com/sasha-s/go-deadlock"
28-
2923
quai "github.com/dominant-strategies/go-quai"
3024
"github.com/dominant-strategies/go-quai/common"
3125
"github.com/dominant-strategies/go-quai/consensus"
@@ -36,6 +30,10 @@ import (
3630
"github.com/dominant-strategies/go-quai/event"
3731
"github.com/dominant-strategies/go-quai/log"
3832
"github.com/dominant-strategies/go-quai/metrics"
33+
"math/big"
34+
"sync"
35+
"sync/atomic"
36+
"time"
3937
)
4038

4139
var (

eth/downloader/downloader_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ import (
2121
"fmt"
2222
"math/big"
2323
"strings"
24+
"sync"
2425
"sync/atomic"
2526
"testing"
2627
"time"
2728

28-
sync "github.com/sasha-s/go-deadlock"
29-
3029
quai "github.com/dominant-strategies/go-quai"
3130
"github.com/dominant-strategies/go-quai/common"
3231
"github.com/dominant-strategies/go-quai/core/rawdb"

eth/downloader/peer.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ import (
2323
"errors"
2424
"math/big"
2525
"sort"
26+
"sync"
2627
"sync/atomic"
2728
"time"
2829

29-
sync "github.com/sasha-s/go-deadlock"
30-
3130
"github.com/dominant-strategies/go-quai/common"
3231
"github.com/dominant-strategies/go-quai/eth/protocols/eth"
3332
"github.com/dominant-strategies/go-quai/event"

eth/downloader/queue_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"fmt"
2121
"math/big"
2222
"math/rand"
23-
sync "github.com/sasha-s/go-deadlock"
23+
"sync"
2424
"testing"
2525
"time"
2626

0 commit comments

Comments
 (0)