mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
release: Introduce database v2 module.
This commit is contained in:
parent
fd29a375d9
commit
9320e2ef89
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/chainhash"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
)
|
||||
|
||||
// fetchBlockCmd defines the configuration options for the fetchblock command.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/chainhash"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
)
|
||||
|
||||
// blockRegionCmd defines the configuration options for the fetchblockregion
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/v2"
|
||||
"github.com/decred/dcrd/database"
|
||||
_ "github.com/decred/dcrd/database/ffldb"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
_ "github.com/decred/dcrd/database/v2/ffldb"
|
||||
"github.com/decred/dcrd/dcrutil/v2"
|
||||
)
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/chainhash"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/dcrutil/v2"
|
||||
"github.com/decred/dcrd/wire"
|
||||
)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/chainhash"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
)
|
||||
|
||||
// headersCmd defines the configuration options for the loadheaders command.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016-2018 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/slog"
|
||||
flags "github.com/jessevdk/go-flags"
|
||||
)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -9,8 +9,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/decred/dcrd/database"
|
||||
_ "github.com/decred/dcrd/database/ffldb"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
_ "github.com/decred/dcrd/database/v2/ffldb"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
)
|
||||
|
||||
// TestErrorCodeStringer tests the stringized output for the ErrorCode type.
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/v2"
|
||||
"github.com/decred/dcrd/database"
|
||||
_ "github.com/decred/dcrd/database/ffldb"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
_ "github.com/decred/dcrd/database/v2/ffldb"
|
||||
"github.com/decred/dcrd/dcrutil/v2"
|
||||
"github.com/decred/dcrd/wire"
|
||||
)
|
||||
@ -50,7 +50,7 @@ func Example_basicUsage() {
|
||||
//
|
||||
// import (
|
||||
// "github.com/decred/dcrd/database2"
|
||||
// _ "github.com/decred/dcrd/database/ffldb"
|
||||
// _ "github.com/decred/dcrd/database/v2/ffldb"
|
||||
// )
|
||||
|
||||
// Create a database and schedule it to be closed and removed on exit.
|
||||
@ -116,7 +116,7 @@ func Example_blockStorageAndRetrieval() {
|
||||
//
|
||||
// import (
|
||||
// "github.com/decred/dcrd/database2"
|
||||
// _ "github.com/decred/dcrd/database/ffldb"
|
||||
// _ "github.com/decred/dcrd/database/v2/ffldb"
|
||||
// )
|
||||
|
||||
// Create a database and schedule it to be closed and removed on exit.
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/v2"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/dcrutil/v2"
|
||||
)
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/chainhash"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/wire"
|
||||
)
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@ import (
|
||||
"github.com/btcsuite/goleveldb/leveldb/opt"
|
||||
"github.com/btcsuite/goleveldb/leveldb/util"
|
||||
"github.com/decred/dcrd/chaincfg/chainhash"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/internal/treap"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/database/v2/internal/treap"
|
||||
"github.com/decred/dcrd/wire"
|
||||
)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -14,7 +14,7 @@ import (
|
||||
"github.com/btcsuite/goleveldb/leveldb"
|
||||
"github.com/btcsuite/goleveldb/leveldb/iterator"
|
||||
"github.com/btcsuite/goleveldb/leveldb/util"
|
||||
"github.com/decred/dcrd/database/internal/treap"
|
||||
"github.com/decred/dcrd/database/v2/internal/treap"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016-2018 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -8,7 +8,7 @@ package ffldb
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/wire"
|
||||
"github.com/decred/slog"
|
||||
)
|
||||
|
||||
@ -14,8 +14,8 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/v2"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/ffldb"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/database/v2/ffldb"
|
||||
"github.com/decred/dcrd/dcrutil/v2"
|
||||
)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -12,7 +12,7 @@ The functions are only exported while the tests are being run.
|
||||
|
||||
package ffldb
|
||||
|
||||
import "github.com/decred/dcrd/database"
|
||||
import "github.com/decred/dcrd/database/v2"
|
||||
|
||||
// TstRunWithMaxBlockFileSize runs the passed function with the maximum allowed
|
||||
// file size for the database set to the provided value. The value will be set
|
||||
|
||||
@ -26,7 +26,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/decred/dcrd/chaincfg/chainhash"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/dcrutil/v2"
|
||||
"github.com/decred/dcrd/wire"
|
||||
)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -8,7 +8,7 @@ package ffldb
|
||||
import (
|
||||
"github.com/btcsuite/goleveldb/leveldb/iterator"
|
||||
"github.com/btcsuite/goleveldb/leveldb/util"
|
||||
"github.com/decred/dcrd/database/internal/treap"
|
||||
"github.com/decred/dcrd/database/v2/internal/treap"
|
||||
)
|
||||
|
||||
// ldbTreapIter wraps a treap iterator to provide the additional functionality
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2015-2016 The btcsuite developers
|
||||
// Copyright (c) 2016 The Decred developers
|
||||
// Copyright (c) 2016-2019 The Decred developers
|
||||
// Use of this source code is governed by an ISC
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@ -9,7 +9,7 @@ import (
|
||||
"fmt"
|
||||
"hash/crc32"
|
||||
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
)
|
||||
|
||||
// The serialized write cursor location format is:
|
||||
|
||||
@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/btcsuite/goleveldb/leveldb"
|
||||
ldberrors "github.com/btcsuite/goleveldb/leveldb/errors"
|
||||
"github.com/decred/dcrd/database"
|
||||
"github.com/decred/dcrd/database/v2"
|
||||
"github.com/decred/dcrd/dcrutil/v2"
|
||||
"github.com/decred/dcrd/wire"
|
||||
)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
module github.com/decred/dcrd/database
|
||||
module github.com/decred/dcrd/database/v2
|
||||
|
||||
go 1.11
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user