From 7a6a843f785f4868073ba5414d4424c257ba781e Mon Sep 17 00:00:00 2001 From: Oleg Bondar Date: Fri, 22 Nov 2024 23:59:34 +0000 Subject: [PATCH] add warnings --- btcd.go | 5 +++++ cmd/addblock/config.go | 4 ++-- cmd/btcctl/config.go | 2 +- cmd/findcheckpoint/config.go | 2 +- config.go | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/btcd.go b/btcd.go index c7f292cbc9..5c81776bcc 100644 --- a/btcd.go +++ b/btcd.go @@ -64,6 +64,11 @@ func btcdMain(serverChan chan<- *server) error { // Show version at startup. btcdLog.Infof("Version %s", version()) + if cfg.TestNet3 { + btcdLog.Warn("Support for testnet3 is deprecated and will be removed in an upcoming release. " + + "Consider switching to testnet4.") + } + // Enable http profiling server if requested. if cfg.Profile != "" { go func() { diff --git a/cmd/addblock/config.go b/cmd/addblock/config.go index 9234619cc9..0eb9bf3d41 100644 --- a/cmd/addblock/config.go +++ b/cmd/addblock/config.go @@ -30,7 +30,7 @@ var ( activeNetParams = &chaincfg.MainNetParams ) -// config defines the configuration options for findcheckpoint. +// config defines the configuration options for addblock. // // See loadConfig for details on the configuration load process. type config struct { @@ -41,7 +41,7 @@ type config struct { Progress int `short:"p" long:"progress" description:"Show a progress message each time this number of seconds have passed -- Use 0 to disable progress announcements"` RegressionTest bool `long:"regtest" description:"Use the regression test network"` SimNet bool `long:"simnet" description:"Use the simulation test network"` - TestNet3 bool `long:"testnet" description:"Use the test network"` + TestNet3 bool `long:"testnet" description:"Use the test network (version 3). Support for testnet3 is deprecated. Consider moving to testnet4 now by using -testnet4"` TestNet4 bool `long:"testnet4" description:"Use the test network (version 4)"` TxIndex bool `long:"txindex" description:"Build a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC"` } diff --git a/cmd/btcctl/config.go b/cmd/btcctl/config.go index 3f112b564e..dfd13961ab 100644 --- a/cmd/btcctl/config.go +++ b/cmd/btcctl/config.go @@ -106,7 +106,7 @@ type config struct { RPCUser string `short:"u" long:"rpcuser" description:"RPC username"` SimNet bool `long:"simnet" description:"Connect to the simulation test network"` TLSSkipVerify bool `long:"skipverify" description:"Do not verify tls certificates (not recommended!)"` - TestNet3 bool `long:"testnet" description:"Connect to testnet"` + TestNet3 bool `long:"testnet" description:"Connect to testnet (version 3). Support for testnet3 is deprecated. Consider moving to testnet4 now by using -testnet4"` TestNet4 bool `long:"testnet4" description:"Connect to testnet (version 4)"` SigNet bool `long:"signet" description:"Connect to signet"` ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"` diff --git a/cmd/findcheckpoint/config.go b/cmd/findcheckpoint/config.go index f1eee962ea..7c6e3865ea 100644 --- a/cmd/findcheckpoint/config.go +++ b/cmd/findcheckpoint/config.go @@ -41,7 +41,7 @@ type config struct { NumCandidates int `short:"n" long:"numcandidates" description:"Max num of checkpoint candidates to show {1-20}"` RegressionTest bool `long:"regtest" description:"Use the regression test network"` SimNet bool `long:"simnet" description:"Use the simulation test network"` - TestNet3 bool `long:"testnet" description:"Use the test network"` + TestNet3 bool `long:"testnet" description:"Use the test network (version 3). Support for testnet3 is deprecated. Consider moving to testnet4 now by using -testnet4"` TestNet4 bool `long:"testnet4" description:"Use the test network (version 4)"` } diff --git a/config.go b/config.go index 10a6847627..083eda5208 100644 --- a/config.go +++ b/config.go @@ -169,7 +169,7 @@ type config struct { SigNet bool `long:"signet" description:"Use the signet test network"` SigNetChallenge string `long:"signetchallenge" description:"Connect to a custom signet network defined by this challenge instead of using the global default signet test network -- Can be specified multiple times"` SigNetSeedNode []string `long:"signetseednode" description:"Specify a seed node for the signet network instead of using the global default signet network seed nodes"` - TestNet3 bool `long:"testnet" description:"Use the test network"` + TestNet3 bool `long:"testnet" description:"Use the test network (version 3). Support for testnet3 is deprecated. Consider moving to testnet4 now by using -testnet4"` TestNet4 bool `long:"testnet4" description:"Use the test network (version 4)"` TorIsolation bool `long:"torisolation" description:"Enable Tor stream isolation by randomizing user credentials for each connection."` TrickleInterval time.Duration `long:"trickleinterval" description:"Minimum time between attempts to send new inventory to a connected peer"`