Repoint repo to btcsuite on btcwalletln, and a few rebase fixes.

This commit is contained in:
Alex 2017-04-27 17:31:27 -06:00 committed by Olaoluwa Osuntokun
parent 189b65ddaf
commit e273e178dd
46 changed files with 136 additions and 135 deletions

View file

@ -13,9 +13,9 @@ import (
"runtime"
"sync"
"github.com/roasbeef/btcwallet/chain"
"github.com/roasbeef/btcwallet/rpc/legacyrpc"
"github.com/roasbeef/btcwallet/wallet"
"github.com/btcsuite/btcwallet/chain"
"github.com/btcsuite/btcwallet/rpc/legacyrpc"
"github.com/btcsuite/btcwallet/wallet"
)
var (

View file

@ -10,6 +10,8 @@ import (
"os"
"path/filepath"
"golang.org/x/crypto/ssh/terminal"
"github.com/btcsuite/btcd/btcjson"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
@ -21,8 +23,6 @@ import (
"github.com/btcsuite/golangcrypto/ssh/terminal"
"github.com/jessevdk/go-flags"
"github.com/roasbeef/btcwallet/internal/cfgutil"
"golang.org/x/crypto/ssh/terminal"
)
var (
@ -171,7 +171,7 @@ func makeInputSource(outputs []btcjson.ListUnspentResult) txauthor.InputSource {
break
}
inputs = append(inputs, wire.NewTxIn(&previousOutPoint, nil))
inputs = append(inputs, wire.NewTxIn(&previousOutPoint, nil, nil))
}
if sourceErr == nil && totalInputValue == 0 {

View file

@ -8,7 +8,7 @@ import (
"strconv"
"strings"
"github.com/roasbeef/btcutil"
"github.com/btcsuite/btcutil"
)
// AmountFlag embeds a btcutil.Amount and implements the flags.Marshaler and

View file

@ -7,8 +7,8 @@
package helpers
import (
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)
// SumOutputValues sums up the list of TxOuts and returns an Amount.

View file

@ -12,8 +12,8 @@ import (
"os"
"strings"
"github.com/roasbeef/btcutil/hdkeychain"
"github.com/roasbeef/btcwallet/internal/legacy/keystore"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcwallet/internal/legacy/keystore"
"github.com/btcsuite/golangcrypto/ssh/terminal"
)

View file

@ -12,8 +12,8 @@ import (
"os"
"strings"
"github.com/roasbeef/btcd/btcjson"
"github.com/roasbeef/btcwallet/internal/rpchelp"
"github.com/btcsuite/btcd/btcjson"
"github.com/btcsuite/btcwallet/internal/rpchelp"
)
var outputFile = func() *os.File {

View file

@ -6,7 +6,7 @@
package rpchelp
import "github.com/roasbeef/btcd/btcjson"
import "github.com/btcsuite/btcd/btcjson"
// Common return types.
var (

View file

@ -7,7 +7,7 @@ package zero_test
import (
"testing"
. "github.com/roasbeef/btcwallet/internal/zero"
. "github.com/btcsuite/btcwallet/internal/zero"
)
var (

View file

@ -10,7 +10,7 @@ import (
"strings"
"testing"
. "github.com/roasbeef/btcwallet/internal/zero"
. "github.com/btcsuite/btcwallet/internal/zero"
)
func makeOneBytes(n int) []byte {

View file

@ -4,7 +4,7 @@
package netparams
import "github.com/roasbeef/btcd/chaincfg"
import "github.com/btcsuite/btcd/chaincfg"
// Params is used to group parameters for various networks such as the main
// network and test networks.

View file

@ -4,6 +4,6 @@
package main
import "github.com/roasbeef/btcwallet/netparams"
import "github.com/btcsuite/btcwallet/netparams"
var activeNet = &netparams.MainNetParams

View file

@ -7,7 +7,7 @@ package legacyrpc
import (
"errors"
"github.com/roasbeef/btcd/btcjson"
"github.com/btcsuite/btcd/btcjson"
)
// TODO(jrick): There are several error paths which 'replace' various errors

View file

@ -1690,7 +1690,7 @@ func signRawTransaction(icmd interface{}, w *wallet.Wallet, chainClient *chain.R
// `complete' denotes that we successfully signed all outputs and that
// all scripts will run to completion. This is returned as part of the
// reply.
signErrs, err := w.SignTransaction(&tx, hashType, inputs, keys, scripts)
signErrs, err := w.SignTransaction(tx, hashType, inputs, keys, scripts)
if err != nil {
return nil, err
}

View file

@ -18,8 +18,8 @@ import (
"strings"
"testing"
"github.com/roasbeef/btcd/btcjson"
"github.com/roasbeef/btcwallet/internal/rpchelp"
"github.com/btcsuite/btcd/btcjson"
"github.com/btcsuite/btcwallet/internal/rpchelp"
)
func serverMethods() map[string]struct{} {

View file

@ -8,11 +8,11 @@
// Full documentation of the API implemented by this package is maintained in a
// language-agnostic document:
//
// https://github.com/roasbeef/btcwallet/blob/master/rpc/documentation/api.md
// https://github.com/btcsuite/btcwallet/blob/master/rpc/documentation/api.md
//
// Any API changes must be performed according to the steps listed here:
//
// https://github.com/roasbeef/btcwallet/blob/master/rpc/documentation/serverchanges.md
// https://github.com/btcsuite/btcwallet/blob/master/rpc/documentation/serverchanges.md
package rpcserver
import (

View file

@ -16,10 +16,10 @@ import (
"strings"
"time"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcwallet/rpc/legacyrpc"
"github.com/roasbeef/btcwallet/rpc/rpcserver"
"github.com/roasbeef/btcwallet/wallet"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/rpc/legacyrpc"
"github.com/btcsuite/btcwallet/rpc/rpcserver"
"github.com/btcsuite/btcwallet/wallet"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)

View file

@ -10,11 +10,11 @@ import (
"encoding/gob"
"fmt"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcwallet/snacl"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/snacl"
"github.com/btcsuite/btcwallet/walletdb"
)
// These constants define the serialized length for a given encrypted extended

View file

@ -9,7 +9,7 @@ import (
"reflect"
"testing"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcwallet/walletdb"
)
func TestPutUsedAddrHash(t *testing.T) {

View file

@ -7,7 +7,7 @@ package votingpool_test
import (
"testing"
vp "github.com/roasbeef/btcwallet/votingpool"
vp "github.com/btcsuite/btcwallet/votingpool"
)
// TestErrorCodeStringer tests that all error codes has a text

View file

@ -23,14 +23,14 @@ import (
"os"
"path/filepath"
"github.com/roasbeef/btcd/chaincfg"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcwallet/votingpool"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
"github.com/roasbeef/btcwallet/wtxmgr"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/votingpool"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
"github.com/btcsuite/btcwallet/wtxmgr"
)
var (

View file

@ -5,10 +5,10 @@
package votingpool
import (
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil/hdkeychain"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
)
var TstLastErr = lastErr

View file

@ -8,12 +8,12 @@ import (
"fmt"
"sort"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcutil/hdkeychain"
"github.com/roasbeef/btcwallet/internal/zero"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcwallet/internal/zero"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
)
const (

View file

@ -11,11 +11,11 @@ import (
"reflect"
"testing"
"github.com/roasbeef/btcutil/hdkeychain"
vp "github.com/roasbeef/btcwallet/votingpool"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
"github.com/btcsuite/btcutil/hdkeychain"
vp "github.com/btcsuite/btcwallet/votingpool"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
)
func TestLoadPoolAndDepositScript(t *testing.T) {

View file

@ -9,8 +9,8 @@ import (
"fmt"
"testing"
"github.com/roasbeef/btcutil/hdkeychain"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcwallet/waddrmgr"
)
func TestPoolEnsureUsedAddr(t *testing.T) {

View file

@ -8,9 +8,9 @@ import (
"bytes"
"testing"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcutil/hdkeychain"
vp "github.com/roasbeef/btcwallet/votingpool"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/hdkeychain"
vp "github.com/btcsuite/btcwallet/votingpool"
)
func TestStartWithdrawal(t *testing.T) {

View file

@ -10,14 +10,14 @@ import (
"sort"
"testing"
"github.com/roasbeef/btcd/chaincfg"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcutil/hdkeychain"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/roasbeef/btcwallet/wtxmgr"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
"github.com/btcsuite/btcwallet/wtxmgr"
)
// TestOutputSplittingNotEnoughInputs checks that an output will get split if we

View file

@ -11,10 +11,10 @@ import (
"path/filepath"
"testing"
"github.com/roasbeef/btcd/chaincfg"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
)
var (

View file

@ -8,7 +8,7 @@ import (
"fmt"
"strconv"
"github.com/roasbeef/btcutil/hdkeychain"
"github.com/btcsuite/btcutil/hdkeychain"
)
var (

View file

@ -9,7 +9,7 @@ import (
"fmt"
"testing"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/waddrmgr"
)
// TestErrorCodeStringer tests the stringized output for the ErrorCode type.

View file

@ -14,7 +14,7 @@ package waddrmgr
import (
"errors"
"github.com/roasbeef/btcwallet/snacl"
"github.com/btcsuite/btcwallet/snacl"
)
// TstMaxRecentHashes makes the unexported maxRecentHashes constant available

View file

@ -8,9 +8,9 @@ package wallet
import (
"time"
"github.com/roasbeef/btcd/chaincfg/chainhash"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)
// Note: The following common types should never reference the Wallet type.

View file

@ -5,9 +5,9 @@
package txsizes
import (
"github.com/roasbeef/btcd/wire"
"github.com/btcsuite/btcd/wire"
h "github.com/roasbeef/btcwallet/internal/helpers"
h "github.com/btcsuite/btcwallet/internal/helpers"
)
// Worst case script and input/output size estimates.

View file

@ -3,8 +3,8 @@ package txsizes_test
import (
"testing"
"github.com/roasbeef/btcd/wire"
. "github.com/roasbeef/btcwallet/wallet/internal/txsizes"
"github.com/btcsuite/btcd/wire"
. "github.com/btcsuite/btcwallet/wallet/internal/txsizes"
)
const (

View file

@ -10,10 +10,10 @@ import (
"path/filepath"
"sync"
"github.com/roasbeef/btcd/chaincfg"
"github.com/roasbeef/btcwallet/internal/prompt"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcwallet/internal/prompt"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
)
const (

View file

@ -8,10 +8,10 @@ package wallet
import (
"errors"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/walletdb"
)
// MakeMultiSigScript creates a multi-signature script that can be redeemed with

View file

@ -8,14 +8,14 @@ package txauthor
import (
"errors"
"github.com/roasbeef/btcd/chaincfg"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcwallet/wallet/txrules"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/wallet/txrules"
h "github.com/roasbeef/btcwallet/internal/helpers"
"github.com/roasbeef/btcwallet/wallet/internal/txsizes"
h "github.com/btcsuite/btcwallet/internal/helpers"
"github.com/btcsuite/btcwallet/wallet/internal/txsizes"
)
// InputSource provides transaction inputs referencing spendable outputs to

View file

@ -7,12 +7,12 @@ package txauthor_test
import (
"testing"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
. "github.com/roasbeef/btcwallet/wallet/txauthor"
"github.com/roasbeef/btcwallet/wallet/txrules"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
. "github.com/btcsuite/btcwallet/wallet/txauthor"
"github.com/btcsuite/btcwallet/wallet/txrules"
"github.com/roasbeef/btcwallet/wallet/internal/txsizes"
"github.com/btcsuite/btcwallet/wallet/internal/txsizes"
)
func p2pkhOutputs(amounts ...btcutil.Amount) []*wire.TxOut {

View file

@ -9,9 +9,9 @@ package txrules
import (
"errors"
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
)
// DefaultRelayFeePerKb is the default minimum relay fee policy for a mempool.

View file

@ -6,9 +6,9 @@
package wallet
import (
"github.com/roasbeef/btcd/chaincfg/chainhash"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/roasbeef/btcwallet/wtxmgr"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcwallet/walletdb"
"github.com/btcsuite/btcwallet/wtxmgr"
)
type unstableAPI struct {

View file

@ -6,9 +6,9 @@
package wallet
import (
"github.com/roasbeef/btcd/txscript"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcwallet/walletdb"
)
// OutputSelectionPolicy describes the rules for selecting an output from the

View file

@ -20,6 +20,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcwallet/chain"

View file

@ -7,7 +7,7 @@ package bdb
import (
"fmt"
"github.com/roasbeef/btcwallet/walletdb"
"github.com/btcsuite/btcwallet/walletdb"
)
const (

View file

@ -10,8 +10,8 @@ import (
"reflect"
"testing"
"github.com/roasbeef/btcwallet/walletdb"
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
"github.com/btcsuite/btcwallet/walletdb"
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
)
// dbType is the database type name for this driver.

View file

@ -9,8 +9,8 @@ import (
"os"
"testing"
"github.com/roasbeef/btcwallet/walletdb"
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
"github.com/btcsuite/btcwallet/walletdb"
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
)
var (

View file

@ -10,8 +10,8 @@ import (
"os"
"path/filepath"
"github.com/roasbeef/btcwallet/walletdb"
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
"github.com/btcsuite/btcwallet/walletdb"
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
)
// This example demonstrates creating a new database.
@ -19,8 +19,8 @@ func ExampleCreate() {
// This example assumes the bdb (bolt db) driver is imported.
//
// import (
// "github.com/roasbeef/btcwallet/walletdb"
// _ "github.com/roasbeef/btcwallet/walletdb/bdb"
// "github.com/btcsuite/btcwallet/walletdb"
// _ "github.com/btcsuite/btcwallet/walletdb/bdb"
// )
// Create a database and schedule it to be closed and removed on exit.
@ -102,8 +102,8 @@ func Example_basicUsage() {
// This example assumes the bdb (bolt db) driver is imported.
//
// import (
// "github.com/roasbeef/btcwallet/walletdb"
// _ "github.com/roasbeef/btcwallet/walletdb/bdb"
// "github.com/btcsuite/btcwallet/walletdb"
// _ "github.com/btcsuite/btcwallet/walletdb/bdb"
// )
// Create a database and schedule it to be closed and removed on exit.

View file

@ -11,16 +11,16 @@ import (
"path/filepath"
"time"
"github.com/roasbeef/btcd/btcec"
"github.com/roasbeef/btcd/chaincfg"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
"github.com/roasbeef/btcwallet/internal/legacy/keystore"
"github.com/roasbeef/btcwallet/internal/prompt"
"github.com/roasbeef/btcwallet/waddrmgr"
"github.com/roasbeef/btcwallet/wallet"
"github.com/roasbeef/btcwallet/walletdb"
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcwallet/internal/legacy/keystore"
"github.com/btcsuite/btcwallet/internal/prompt"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/btcsuite/btcwallet/wallet"
"github.com/btcsuite/btcwallet/walletdb"
_ "github.com/btcsuite/btcwallet/walletdb/bdb"
)
// networkDir returns the directory name of a network directory to hold wallet