From 130e44c7611c0103b84672f7bc1becf7ab239f04 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Mon, 13 Oct 2014 17:57:57 -0500 Subject: [PATCH] Move keystore to legacy directory. --- chain/chain.go | 2 +- chainntfns.go | 2 +- createtx.go | 2 +- {keystore => legacy/keystore}/keystore.go | 10 +++++----- {keystore => legacy/keystore}/keystore_test.go | 0 rescan.go | 2 +- rpcserver.go | 2 +- wallet.go | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) rename {keystore => legacy/keystore}/keystore.go (99%) rename {keystore => legacy/keystore}/keystore_test.go (100%) diff --git a/chain/chain.go b/chain/chain.go index 5f053e5..8e4c960 100644 --- a/chain/chain.go +++ b/chain/chain.go @@ -26,7 +26,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcrpcclient" "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcwallet/keystore" + "github.com/btcsuite/btcwallet/legacy/keystore" "github.com/btcsuite/btcwallet/txstore" ) diff --git a/chainntfns.go b/chainntfns.go index 4a3784c..c3fd24a 100644 --- a/chainntfns.go +++ b/chainntfns.go @@ -20,7 +20,7 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcwallet/chain" - "github.com/btcsuite/btcwallet/keystore" + "github.com/btcsuite/btcwallet/legacy/keystore" "github.com/btcsuite/btcwallet/txstore" ) diff --git a/createtx.go b/createtx.go index e34a7c5..e3f9327 100644 --- a/createtx.go +++ b/createtx.go @@ -27,7 +27,7 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcwallet/keystore" + "github.com/btcsuite/btcwallet/legacy/keystore" "github.com/btcsuite/btcwallet/txstore" ) diff --git a/keystore/keystore.go b/legacy/keystore/keystore.go similarity index 99% rename from keystore/keystore.go rename to legacy/keystore/keystore.go index 742bd02..7f9f871 100644 --- a/keystore/keystore.go +++ b/legacy/keystore/keystore.go @@ -45,7 +45,7 @@ import ( ) const ( - filename = "wallet.bin" + Filename = "wallet.bin" // Length in bytes of KDF output. kdfOutputBytes = 32 @@ -587,9 +587,9 @@ func New(dir string, desc string, passphrase []byte, net *chaincfg.Params, // Create and fill key store. s := &Store{ - path: filepath.Join(dir, filename), + path: filepath.Join(dir, Filename), dir: dir, - file: filename, + file: Filename, vers: VersCurrent, net: (*netParams)(net), flags: walletFlags{ @@ -878,7 +878,7 @@ func (s *Store) WriteIfDirty() error { // be checked with os.IsNotExist to differentiate missing file errors from // others (including deserialization). func OpenDir(dir string) (*Store, error) { - path := filepath.Join(dir, filename) + path := filepath.Join(dir, Filename) fi, err := os.OpenFile(path, os.O_RDONLY, 0) if err != nil { return nil, err @@ -891,7 +891,7 @@ func OpenDir(dir string) (*Store, error) { } store.path = path store.dir = dir - store.file = filename + store.file = Filename return store, nil } diff --git a/keystore/keystore_test.go b/legacy/keystore/keystore_test.go similarity index 100% rename from keystore/keystore_test.go rename to legacy/keystore/keystore_test.go diff --git a/rescan.go b/rescan.go index 05e1321..cfcfd00 100644 --- a/rescan.go +++ b/rescan.go @@ -20,7 +20,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcwallet/chain" - "github.com/btcsuite/btcwallet/keystore" + "github.com/btcsuite/btcwallet/legacy/keystore" ) // RescanProgressMsg reports the current progress made by a rescan for a diff --git a/rpcserver.go b/rpcserver.go index e1952c9..f6e92fd 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -45,7 +45,7 @@ import ( "github.com/btcsuite/btcrpcclient" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcwallet/chain" - "github.com/btcsuite/btcwallet/keystore" + "github.com/btcsuite/btcwallet/legacy/keystore" "github.com/btcsuite/btcwallet/txstore" "github.com/btcsuite/websocket" ) diff --git a/wallet.go b/wallet.go index 3be92df..723da46 100644 --- a/wallet.go +++ b/wallet.go @@ -32,7 +32,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcwallet/chain" - "github.com/btcsuite/btcwallet/keystore" + "github.com/btcsuite/btcwallet/legacy/keystore" "github.com/btcsuite/btcwallet/txstore" )