Skip to content

Commit

Permalink
switch to dcrlabs (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
buck54321 authored Jan 14, 2024
1 parent f296bfa commit 3e3078a
Show file tree
Hide file tree
Showing 20 changed files with 82 additions and 92 deletions.
2 changes: 1 addition & 1 deletion bamboozle_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

"github.com/dcrlabs/neutrino-bch/headerfs"

"github.com/dcrlabs/bchwallet/walletdb"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchd/wire"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/walletdb"
)

func decodeHashNoError(str string) *chainhash.Hash {
Expand Down
2 changes: 1 addition & 1 deletion banman/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net"
"time"

"github.com/gcash/bchwallet/walletdb"
"github.com/dcrlabs/bchwallet/walletdb"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions banman/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/dcrlabs/neutrino-bch/banman"

"github.com/gcash/bchwallet/walletdb"
_ "github.com/gcash/bchwallet/walletdb/bdb"
"github.com/dcrlabs/bchwallet/walletdb"
_ "github.com/dcrlabs/bchwallet/walletdb/bdb"
)

// createTestBanStore creates a test Store backed by a boltdb instance.
Expand Down
2 changes: 1 addition & 1 deletion blockmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import (
"github.com/dcrlabs/neutrino-bch/blockntfns"
"github.com/dcrlabs/neutrino-bch/headerfs"

"github.com/dcrlabs/bchwallet/walletdb"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchd/peer"
"github.com/gcash/bchd/txscript"
"github.com/gcash/bchd/wire"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/walletdb"
)

// maxHeight is the height we will generate filter headers up to. We use an odd
Expand Down
6 changes: 3 additions & 3 deletions chain/neutrino.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (
"github.com/gcash/bchd/btcjson"
"github.com/gcash/bchlog"

"github.com/dcrlabs/bchwallet/chain"
"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/dcrlabs/bchwallet/wtxmgr"
neutrino "github.com/dcrlabs/neutrino-bch"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
Expand All @@ -23,9 +26,6 @@ import (
"github.com/gcash/bchutil"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/chain"
"github.com/gcash/bchwallet/waddrmgr"
"github.com/gcash/bchwallet/wtxmgr"
)

// NeutrinoClient is an implementation of the bchwalet chain.Interface interface.
Expand Down
2 changes: 1 addition & 1 deletion filterdb/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package filterdb
import (
"fmt"

"github.com/dcrlabs/bchwallet/walletdb"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/walletdb"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions filterdb/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"reflect"
"testing"

"github.com/dcrlabs/bchwallet/walletdb"
_ "github.com/dcrlabs/bchwallet/walletdb/bdb"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/walletdb"
_ "github.com/gcash/bchwallet/walletdb/bdb"
)

func createTestDatabase() (func(), FilterDatabase, error) {
Expand Down
16 changes: 7 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,23 @@ go 1.18

require (
github.com/davecgh/go-spew v1.1.1
github.com/gcash/bchd v0.18.1
github.com/dcrlabs/bchwallet v0.0.0-20240114115928-2a995d024eed
github.com/gcash/bchd v0.19.0
github.com/gcash/bchlog v0.0.0-20180913005452-b4f036f92fa6
github.com/gcash/bchutil v0.0.0-20210113190856-6ea28dff4000
github.com/gcash/bchwallet v0.8.3-0.20210524112536-14ca25bc6549
github.com/gcash/bchwallet/walletdb v0.0.0-20210524044131-61bcca2ae6f9
)

require (
github.com/aead/siphash v1.0.1 // indirect
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
github.com/btcsuite/golangcrypto v0.0.0-20150304025918-53f62d9b43e8 // indirect
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
github.com/dchest/siphash v1.2.2 // indirect
github.com/gcash/neutrino v0.0.0-20210524105223-4cec86bbd8a4 // indirect
github.com/dchest/siphash v1.2.3 // indirect
github.com/kkdai/bstream v1.0.0 // indirect
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
github.com/zquestz/grab v0.0.0-20190224022517-abcee96e61b1 // indirect
go.etcd.io/bbolt v1.3.5 // indirect
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
golang.org/x/sys v0.0.0-20210521203332-0cec03c779c1 // indirect
golang.org/x/text v0.3.6 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
golang.org/x/text v0.3.7 // indirect
)
102 changes: 47 additions & 55 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion headerfs/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"sort"

"github.com/dcrlabs/bchwallet/walletdb"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchwallet/walletdb"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions headerfs/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"testing"

"github.com/gcash/bchwallet/walletdb"
_ "github.com/gcash/bchwallet/walletdb/bdb"
"github.com/dcrlabs/bchwallet/walletdb"
_ "github.com/dcrlabs/bchwallet/walletdb/bdb"
)

func createTestIndex() (func(), *headerIndex, error) {
Expand Down
4 changes: 2 additions & 2 deletions headerfs/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
"sync"
"time"

"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/dcrlabs/bchwallet/walletdb"
"github.com/gcash/bchd/blockchain"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchd/wire"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/waddrmgr"
"github.com/gcash/bchwallet/walletdb"
)

// BlockHeaderStore is an interface that provides an abstraction for a generic
Expand Down
2 changes: 1 addition & 1 deletion headerfs/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"time"

"github.com/davecgh/go-spew/spew"
"github.com/dcrlabs/bchwallet/walletdb"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchd/wire"
"github.com/gcash/bchwallet/walletdb"
)

func createTestBlockHeaderStore() (func(), walletdb.DB, string,
Expand Down
2 changes: 1 addition & 1 deletion mock_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/dcrlabs/neutrino-bch/headerfs"

"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/gcash/bchd/blockchain"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchd/wire"
"github.com/gcash/bchwallet/waddrmgr"
)

// mockBlockHeaderStore is an implementation of the BlockHeaderStore backed by
Expand Down
4 changes: 2 additions & 2 deletions neutrino.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"github.com/dcrlabs/neutrino-bch/headerfs"
"github.com/dcrlabs/neutrino-bch/pushtx"

"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/dcrlabs/bchwallet/walletdb"
"github.com/gcash/bchd/addrmgr"
"github.com/gcash/bchd/blockchain"
"github.com/gcash/bchd/btcjson"
Expand All @@ -31,8 +33,6 @@ import (
"github.com/gcash/bchutil"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/waddrmgr"
"github.com/gcash/bchwallet/walletdb"
)

// These are exported variables so they can be changed by users.
Expand Down
2 changes: 1 addition & 1 deletion pushtx/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"github.com/dcrlabs/neutrino-bch/blockntfns"

"github.com/dcrlabs/bchwallet/wtxmgr"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchd/wire"
"github.com/gcash/bchwallet/wtxmgr"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion rescan.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/dcrlabs/neutrino-bch/blockntfns"
"github.com/dcrlabs/neutrino-bch/headerfs"

"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/gcash/bchd/btcjson"
"github.com/gcash/bchd/chaincfg"
"github.com/gcash/bchd/chaincfg/chainhash"
Expand All @@ -22,7 +23,6 @@ import (
"github.com/gcash/bchutil"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/waddrmgr"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import (
"github.com/dcrlabs/neutrino-bch"
"github.com/dcrlabs/neutrino-bch/banman"

"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/dcrlabs/bchwallet/wallet/txauthor"
"github.com/dcrlabs/bchwallet/walletdb"
_ "github.com/dcrlabs/bchwallet/walletdb/bdb"
"github.com/gcash/bchd/bchec"
"github.com/gcash/bchd/btcjson"
"github.com/gcash/bchd/chaincfg"
Expand All @@ -28,10 +32,6 @@ import (
"github.com/gcash/bchlog"
"github.com/gcash/bchutil"
"github.com/gcash/bchutil/gcs/builder"
"github.com/gcash/bchwallet/waddrmgr"
"github.com/gcash/bchwallet/wallet/txauthor"
"github.com/gcash/bchwallet/walletdb"
_ "github.com/gcash/bchwallet/walletdb/bdb"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion utxoscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"sync/atomic"
"time"

"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchutil"
"github.com/gcash/bchwallet/waddrmgr"
)

// getUtxoResult is a simple pair type holding a spend report and error.
Expand Down
2 changes: 1 addition & 1 deletion utxoscanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"testing"
"time"

"github.com/dcrlabs/bchwallet/waddrmgr"
"github.com/gcash/bchd/chaincfg/chainhash"
"github.com/gcash/bchd/wire"
"github.com/gcash/bchutil"
"github.com/gcash/bchutil/gcs"
"github.com/gcash/bchwallet/waddrmgr"
)

type MockChainClient struct {
Expand Down

0 comments on commit 3e3078a

Please sign in to comment.