diff --git a/cmdmgr.go b/cmdmgr.go index a60e74c..4ca1ae0 100644 --- a/cmdmgr.go +++ b/cmdmgr.go @@ -614,10 +614,10 @@ func CreateEncryptedWallet(reply chan []byte, msg *btcjson.Message) { wallets.RUnlock() var net btcwire.BitcoinNet - if cfg.TestNet3 { - net = btcwire.TestNet3 - } else { + if cfg.MainNet { net = btcwire.MainNet + } else { + net = btcwire.TestNet3 } w, err := wallet.NewWallet(wname, desc, []byte(pass), net) if err != nil { diff --git a/config.go b/config.go index df10f48..7b2e4aa 100644 --- a/config.go +++ b/config.go @@ -45,7 +45,7 @@ type config struct { DataDir string `short:"D" long:"datadir" description:"Directory to store wallets and transactions"` Username string `short:"u" long:"username" description:"Username for btcd authorization"` Password string `short:"P" long:"password" description:"Password for btcd authorization"` - TestNet3 bool `long:"testnet" description:"Use the test network"` + MainNet bool `long:"mainnet" description:"Use the main Bitcoin network (default testnet3)"` } // btcwalletHomeDir returns an OS appropriate home directory for btcwallet. diff --git a/sockets.go b/sockets.go index d737825..ddccebf 100644 --- a/sockets.go +++ b/sockets.go @@ -485,10 +485,10 @@ func BtcdHandshake(ws *websocket.Conn) { } var walletNetwork btcwire.BitcoinNet - if cfg.TestNet3 { - walletNetwork = btcwire.TestNet3 - } else { + if cfg.MainNet { walletNetwork = btcwire.MainNet + } else { + walletNetwork = btcwire.TestNet3 } correctNetwork <- btcwire.BitcoinNet(fnet) == walletNetwork