Skip to content

Commit

Permalink
Merge branch 'upstream' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed May 9, 2016
2 parents c033392 + 39fd9bd commit 47d16dc
Show file tree
Hide file tree
Showing 32 changed files with 1,076 additions and 914 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
btcwallet
vendor
*~
11 changes: 7 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
language: go
go:
- 1.5.3
- 1.6
- 1.5.4
- 1.6.2
sudo: false
before_install:
- gotools=golang.org/x/tools
install:
- go get -d -t -v ./...
- go get -v github.com/Masterminds/glide
- glide install
- go get -v $(glide novendor)
- go get -v $gotools/cmd/cover
- go get -v github.com/bradfitz/goimports
- go get -v github.com/golang/lint/golint
- go get -v github.com/davecgh/go-spew/spew
script:
- export PATH=$PATH:$HOME/gopath/bin
- export GO15VENDOREXPERIMENT=1
- ./goclean.sh
72 changes: 65 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,74 @@ https://github.com/decred/decred-release/releases

### Windows/Linux/BSD/POSIX - Build from source

- If necessary, install Go according to the installation instructions
here: http://golang.org/doc/install. It is recommended to add
`$GOPATH/bin` to your `PATH` at this point.
Building or updating from source requires the following build dependencies:

- Run the following commands to obtain and install dcrd, dcrwallet
and all dependencies:
- **Go 1.5 or 1.6**

Installation instructions can be found here: http://golang.org/doc/install.
It is recommended to add `$GOPATH/bin` to your `PATH` at this point.

**Note:** If you are using Go 1.5, you must manually enable the vendor
experiment by setting the `GO15VENDOREXPERIMENT` environment variable to
`1`. This step is not required for Go 1.6.

- **Glide**

Glide is used to manage project dependencies and provide reproducible builds.
To install:

`go get -u github.com/Masterminds/glide`

Unfortunately, the use of `glide` prevents a handy tool such as `go get` from
automatically downloading, building, and installing the source in a single
command. Instead, the latest project and dependency sources must be first
obtained manually with `git` and `glide`, and then `go` is used to build and
install the project.

**Getting the source**:

For a first time installation, the project and dependency sources can be
obtained manually with `git` and `glide` (create directories as needed):

```
git clone https://github.com/decred/dcrwallet $GOPATH/src/github.com/decred/dcrwallet
cd $GOPATH/src/github.com/decred/dcrwallet
glide install
```

To update an existing source tree, pull the latest changes and install the
matching dependencies:

```
cd $GOPATH/src/github.com/decred/dcrwallet
git pull
glide install
```

**Building/Installing**:

The `go` tool is used to build or install (to `GOPATH`) the project. Some
example build instructions are provided below (all must run from the `dcrwallet`
project directory).

To build and install `dcrwallet` and all helper commands (in the `cmd`
directory) to `$GOPATH/bin/`, as well as installing all compiled packages to
`$GOPATH/pkg/` (**use this if you are unsure which command to run**):

```
go install . ./cmd/...
```

To build a `dcrwallet` executable and install it to `$GOPATH/bin/`:

```
go install
```

To build a `dcrwallet` executable and place it in the current directory:

```
go get -u -v github.com/decred/dcrd/...
go get -u -v github.com/decred/dcrwallet/...
go build
```

## Getting Started
Expand Down
4 changes: 2 additions & 2 deletions cmd/dropwtxmgr/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2015 The btcsuite developers
// Copyright (c) 2015-2016 The btcsuite developers
// Copyright (c) 2015-2016 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
Expand All @@ -11,10 +11,10 @@ import (
"os"
"path/filepath"

"github.com/btcsuite/go-flags"
"github.com/decred/dcrutil"
"github.com/decred/dcrwallet/walletdb"
_ "github.com/decred/dcrwallet/walletdb/bdb"
"github.com/jessevdk/go-flags"
)

const defaultNet = "mainnet"
Expand Down
6 changes: 3 additions & 3 deletions cmd/sweepaccount/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"os"
"path/filepath"

"github.com/btcsuite/go-flags"
"github.com/btcsuite/golangcrypto/ssh/terminal"
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrd/dcrjson"
Expand All @@ -23,6 +22,7 @@ import (
"github.com/decred/dcrwallet/netparams"
"github.com/decred/dcrwallet/wallet/txauthor"
"github.com/decred/dcrwallet/wallet/txrules"
"github.com/jessevdk/go-flags"
)

var (
Expand Down Expand Up @@ -57,7 +57,7 @@ var opts = struct {
RPCConnect: "localhost",
RPCUsername: "",
RPCCertificateFile: filepath.Join(walletDataDirectory, "rpc.cert"),
FeeRate: &cfgutil.AmountFlag{txrules.DefaultRelayFeePerKb},
FeeRate: cfgutil.NewAmountFlag(txrules.DefaultRelayFeePerKb),
SourceAccount: "imported",
DestinationAccount: "default",
RequiredConfirmations: 2,
Expand Down Expand Up @@ -339,7 +339,7 @@ func parseOutPoint(input *dcrjson.ListUnspentResult) (wire.OutPoint, error) {
if err != nil {
return wire.OutPoint{}, err
}
return wire.OutPoint{*txHash, input.Vout, input.Tree}, nil
return wire.OutPoint{Hash: *txHash, Index: input.Vout, Tree: input.Tree}, nil
}

func pickNoun(n int, singularForm, pluralForm string) string {
Expand Down
Loading

0 comments on commit 47d16dc

Please sign in to comment.