Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mining: Move to internal. #2275

Merged
merged 2 commits into from Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion blockmanager.go
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/decred/dcrd/dcrutil/v3"
"github.com/decred/dcrd/fees/v2"
"github.com/decred/dcrd/internal/mempool"
"github.com/decred/dcrd/mining/v3"
"github.com/decred/dcrd/internal/mining"
peerpkg "github.com/decred/dcrd/peer/v2"
"github.com/decred/dcrd/wire"
)
Expand Down
3 changes: 1 addition & 2 deletions docs/assets/module_hierarchy.gv
Expand Up @@ -21,7 +21,6 @@ digraph {
standalone [label="blockchain/standalone" fillcolor=firebrick4]
gcs [label="gcs" fillcolor=gold]
blockchain [label="blockchain/v2" fillcolor=orchid]
mining [label="mining/v2" fillcolor=chartreuse]
lru [label="lru" fillcolor=royalblue3]
peer [label="peer/v2" fillcolor=khaki]
rpcclient [label="rpcclient/v4" fillcolor=mediumseagreen]
Expand Down Expand Up @@ -50,7 +49,7 @@ digraph {
standalone -> blockchain [dir=back color=firebrick4]
gcs -> blockchain [dir=back color=gold]
gcs -> rpcclient [dir=back color=gold]
blockchain -> mining [dir=back color=orchid]

lru -> peer [dir=back color=royalblue3]
blockchain -> peer [dir=back color=orchid]
dcrjson -> types [dir=back color=tomato]
Expand Down
222 changes: 106 additions & 116 deletions docs/assets/module_hierarchy.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions go.mod
Expand Up @@ -25,7 +25,6 @@ require (
github.com/decred/dcrd/gcs/v2 v2.0.1
github.com/decred/dcrd/hdkeychain/v3 v3.0.0
github.com/decred/dcrd/lru v1.0.0
github.com/decred/dcrd/mining/v3 v3.0.0-20200215031403-6b2ce76f0986
github.com/decred/dcrd/peer/v2 v2.1.0
github.com/decred/dcrd/rpc/jsonrpc/types/v2 v2.0.1-0.20200503044000-76f6906e50e5
github.com/decred/dcrd/rpcclient/v6 v6.0.0-20200215031403-6b2ce76f0986
Expand Down Expand Up @@ -63,7 +62,6 @@ replace (
github.com/decred/dcrd/hdkeychain/v3 => ./hdkeychain
github.com/decred/dcrd/limits => ./limits
github.com/decred/dcrd/lru => ./lru
github.com/decred/dcrd/mining/v3 => ./mining
github.com/decred/dcrd/peer/v2 => ./peer
github.com/decred/dcrd/rpc/jsonrpc/types/v2 => ./rpc/jsonrpc/types
github.com/decred/dcrd/rpcclient/v6 => ./rpcclient
Expand Down
2 changes: 1 addition & 1 deletion internal/mempool/mempool.go
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrd/chaincfg/v3"
"github.com/decred/dcrd/dcrutil/v3"
"github.com/decred/dcrd/mining/v3"
"github.com/decred/dcrd/internal/mining"
"github.com/decred/dcrd/txscript/v3"
"github.com/decred/dcrd/wire"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/mempool/mempool_test.go
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/decred/dcrd/dcrec"
"github.com/decred/dcrd/dcrec/secp256k1/v3"
"github.com/decred/dcrd/dcrutil/v3"
"github.com/decred/dcrd/mining/v3"
"github.com/decred/dcrd/internal/mining"
"github.com/decred/dcrd/txscript/v3"
"github.com/decred/dcrd/wire"
)
Expand Down
8 changes: 1 addition & 7 deletions mining/README.md → internal/mining/README.md
Expand Up @@ -3,18 +3,12 @@ mining

[![Build Status](https://github.com/decred/dcrd/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/dcrd/actions)
[![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/mining/v3)
[![Doc](https://img.shields.io/badge/doc-reference-blue.svg)](https://pkg.go.dev/github.com/decred/dcrd/internal/mining)

## Overview

This package is currently a work in progress.

## Installation and Updating

```bash
$ go get -u github.com/decred/dcrd/mining
```

## License

Package mining is licensed under the [copyfree](http://copyfree.org) ISC
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions internal/mining/doc.go
@@ -0,0 +1,11 @@
// Copyright (c) 2016-2020 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

/*
Package mining includes all mining and policy types, and will house all mining
code in the future.

It is currently a work in progress.
*/
package mining
File renamed without changes.
3 changes: 1 addition & 2 deletions mining/log.go → internal/mining/log.go
@@ -1,5 +1,4 @@
// Copyright (c) 2013-2014 The btcsuite developers
// Copyright (c) 2015-2020 The Decred developers
// Copyright (c) 2020 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion log.go
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/decred/dcrd/database/v2"
"github.com/decred/dcrd/fees/v2"
"github.com/decred/dcrd/internal/mempool"
"github.com/decred/dcrd/internal/mining"
"github.com/decred/dcrd/internal/rpcserver"
"github.com/decred/dcrd/mining/v3"
"github.com/decred/dcrd/peer/v2"
"github.com/decred/dcrd/txscript/v3"
"github.com/decred/slog"
Expand Down
15 changes: 0 additions & 15 deletions mining/doc.go

This file was deleted.

31 changes: 0 additions & 31 deletions mining/go.mod

This file was deleted.

61 changes: 0 additions & 61 deletions mining/go.sum

This file was deleted.

2 changes: 1 addition & 1 deletion rpcserver.go
Expand Up @@ -47,9 +47,9 @@ import (
"github.com/decred/dcrd/dcrjson/v3"
"github.com/decred/dcrd/dcrutil/v3"
"github.com/decred/dcrd/internal/mempool"
"github.com/decred/dcrd/internal/mining"
"github.com/decred/dcrd/internal/rpcserver"
"github.com/decred/dcrd/internal/version"
"github.com/decred/dcrd/mining/v3"
"github.com/decred/dcrd/rpc/jsonrpc/types/v2"
"github.com/decred/dcrd/txscript/v3"
"github.com/decred/dcrd/wire"
Expand Down
2 changes: 1 addition & 1 deletion rpcwebsocket.go
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/decred/dcrd/crypto/ripemd160"
"github.com/decred/dcrd/dcrjson/v3"
"github.com/decred/dcrd/dcrutil/v3"
"github.com/decred/dcrd/mining/v3"
"github.com/decred/dcrd/internal/mining"
"github.com/decred/dcrd/rpc/jsonrpc/types/v2"
"github.com/decred/dcrd/txscript/v3"
"github.com/decred/dcrd/wire"
Expand Down
2 changes: 1 addition & 1 deletion server.go
Expand Up @@ -36,9 +36,9 @@ import (
"github.com/decred/dcrd/gcs/v2"
"github.com/decred/dcrd/gcs/v2/blockcf"
"github.com/decred/dcrd/internal/mempool"
"github.com/decred/dcrd/internal/mining"
"github.com/decred/dcrd/internal/version"
"github.com/decred/dcrd/lru"
"github.com/decred/dcrd/mining/v3"
"github.com/decred/dcrd/peer/v2"
"github.com/decred/dcrd/txscript/v3"
"github.com/decred/dcrd/wire"
Expand Down