mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #17285: doc: Bip70 removal follow-up
3ed8e3d079a3860dcdf944f7c1aa37765a53da32 doc: Remove explicit network name references (Fabian Jahr) d6e493f0c2850b522a676a005935163beddaa2cc wallet: Remove left-over BIP70 comment (Fabian Jahr) Pull request description: A small follow-up to #17165 which removed BIP70 support. 1. Removes one leftover mention of BIP70 in a comment. 2. Removes BIP70 reference in comments on network/chain name strings. These can be removed as they are not really helpful and also incorrect: BIP70 only defines "main" and "test" but not "regtest". If/When signet gets merged we will add another name to the list that is not defined in BIP70. Mostly there is also an exhaustive list of the options included in the comment anyway. If we would like to keep an identifier for this naming scheme, I would suggest switching to something more generic, like 'short chain name'. Happy to implement that if that is preferred. Alternatively, we could add a reference to `CBaseChainParams`. That would also mean we don't have to change these lines again for signet. ACKs for top commit: MarcoFalke: ACK 3ed8e3d079a3860dcdf944f7c1aa37765a53da32 Tree-SHA512: 9a7c0b9cacbb67bd31a089ffdc6f1ebc7f336493e2c8266eb697da34dce2b505a431d5639a3e4fc34f9287361343e861b55dc2662e0a1d2095cc1046db77d6ee
This commit is contained in:
parent
059d8e671f
commit
4a08360143
@ -61,7 +61,7 @@ Given a height: returns hash of block in best-block-chain at height provided.
|
|||||||
|
|
||||||
Returns various state info regarding block chain processing.
|
Returns various state info regarding block chain processing.
|
||||||
Only supports JSON as output format.
|
Only supports JSON as output format.
|
||||||
* chain : (string) current network name as defined in BIP70 (main, test, regtest)
|
* chain : (string) current network name (main, test, regtest)
|
||||||
* blocks : (numeric) the current number of blocks processed in the server
|
* blocks : (numeric) the current number of blocks processed in the server
|
||||||
* headers : (numeric) the current number of headers we have validated
|
* headers : (numeric) the current number of headers we have validated
|
||||||
* bestblockhash : (string) the hash of the currently best block
|
* bestblockhash : (string) the hash of the currently best block
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
bool AllowMultiplePorts() const { return fAllowMultiplePorts; }
|
bool AllowMultiplePorts() const { return fAllowMultiplePorts; }
|
||||||
/** How long to wait until we allow retrying of a LLMQ connection */
|
/** How long to wait until we allow retrying of a LLMQ connection */
|
||||||
int LLMQConnectionRetryTimeout() const { return nLLMQConnectionRetryTimeout; }
|
int LLMQConnectionRetryTimeout() const { return nLLMQConnectionRetryTimeout; }
|
||||||
/** Return the BIP70 network string (main, test or regtest) */
|
/** Return the network string */
|
||||||
std::string NetworkIDString() const { return strNetworkID; }
|
std::string NetworkIDString() const { return strNetworkID; }
|
||||||
/** Return the list of hostnames to look up for DNS seeds */
|
/** Return the list of hostnames to look up for DNS seeds */
|
||||||
const std::vector<std::string>& DNSSeeds() const { return vSeeds; }
|
const std::vector<std::string>& DNSSeeds() const { return vSeeds; }
|
||||||
@ -163,7 +163,7 @@ std::unique_ptr<const CChainParams> CreateChainParams(const std::string& chain);
|
|||||||
const CChainParams &Params();
|
const CChainParams &Params();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the params returned by Params() to those for the given BIP70 chain name.
|
* Sets the params returned by Params() to those for the given chain name.
|
||||||
* @throws std::runtime_error when the chain is not supported.
|
* @throws std::runtime_error when the chain is not supported.
|
||||||
*/
|
*/
|
||||||
void SelectParams(const std::string& chain);
|
void SelectParams(const std::string& chain);
|
||||||
|
@ -15,11 +15,13 @@
|
|||||||
class CBaseChainParams
|
class CBaseChainParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** BIP70 chain name strings (main, test or regtest) */
|
///@{
|
||||||
|
/** Chain name strings */
|
||||||
static const std::string MAIN;
|
static const std::string MAIN;
|
||||||
static const std::string TESTNET;
|
static const std::string TESTNET;
|
||||||
static const std::string DEVNET;
|
static const std::string DEVNET;
|
||||||
static const std::string REGTEST;
|
static const std::string REGTEST;
|
||||||
|
///@}
|
||||||
|
|
||||||
const std::string& DataDir() const { return strDataDir; }
|
const std::string& DataDir() const { return strDataDir; }
|
||||||
int RPCPort() const { return nRPCPort; }
|
int RPCPort() const { return nRPCPort; }
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
class NetworkStyle
|
class NetworkStyle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Get style associated with provided BIP70 network id, or 0 if not known */
|
/** Get style associated with provided network id, or 0 if not known */
|
||||||
static const NetworkStyle *instantiate(const QString &networkId);
|
static const NetworkStyle *instantiate(const QString &networkId);
|
||||||
|
|
||||||
const QString &getAppName() const { return appName; }
|
const QString &getAppName() const { return appName; }
|
||||||
|
@ -61,8 +61,8 @@ public:
|
|||||||
CAmount amount;
|
CAmount amount;
|
||||||
// If from a payment request, this is used for storing the memo
|
// If from a payment request, this is used for storing the memo
|
||||||
QString message;
|
QString message;
|
||||||
// If building with BIP70 is disabled, keep the payment request around as
|
// Keep the payment request around as a serialized string to ensure
|
||||||
// serialized string to ensure load/store is lossless
|
// load/store is lossless.
|
||||||
std::string sPaymentRequest;
|
std::string sPaymentRequest;
|
||||||
// Empty if no authentication or invalid signature/cert/etc.
|
// Empty if no authentication or invalid signature/cert/etc.
|
||||||
QString authenticatedMerchant;
|
QString authenticatedMerchant;
|
||||||
|
@ -1476,7 +1476,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
|
|||||||
{},
|
{},
|
||||||
RPCResult{
|
RPCResult{
|
||||||
"{\n"
|
"{\n"
|
||||||
" \"chain\" : \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest) and\n"
|
" \"chain\" : \"xxxx\", (string) current network name (main, test, regtest) and\n"
|
||||||
" devnet or devnet-<name> for \"-devnet\" and \"-devnet=<name>\" respectively\n"
|
" devnet or devnet-<name> for \"-devnet\" and \"-devnet=<name>\" respectively\n"
|
||||||
" \"blocks\" : xxxxxx, (numeric) the height of the most-work fully-validated chain. The genesis block has height 0\n"
|
" \"blocks\" : xxxxxx, (numeric) the height of the most-work fully-validated chain. The genesis block has height 0\n"
|
||||||
" \"headers\" : xxxxxx, (numeric) the current number of headers we have validated\n"
|
" \"headers\" : xxxxxx, (numeric) the current number of headers we have validated\n"
|
||||||
|
@ -420,7 +420,7 @@ static UniValue getmininginfo(const JSONRPCRequest& request)
|
|||||||
" \"difficulty\" : xxx.xxxxx (numeric) The current difficulty\n"
|
" \"difficulty\" : xxx.xxxxx (numeric) The current difficulty\n"
|
||||||
" \"networkhashps\" : nnn, (numeric) The network hashes per second\n"
|
" \"networkhashps\" : nnn, (numeric) The network hashes per second\n"
|
||||||
" \"pooledtx\" : n (numeric) The size of the mempool\n"
|
" \"pooledtx\" : n (numeric) The size of the mempool\n"
|
||||||
" \"chain\" : \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n"
|
" \"chain\" : \"xxxx\", (string) current network name (main, test, regtest)\n"
|
||||||
" \"warnings\" : \"...\" (string) any network and blockchain warnings\n"
|
" \"warnings\" : \"...\" (string) any network and blockchain warnings\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
},
|
},
|
||||||
|
@ -295,7 +295,7 @@ public:
|
|||||||
void ForceRemoveArg(const std::string& strArg);
|
void ForceRemoveArg(const std::string& strArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
|
* Returns the appropriate chain name from the program arguments.
|
||||||
* @return CBaseChainParams::MAIN by default; raises runtime error if an invalid combination is given.
|
* @return CBaseChainParams::MAIN by default; raises runtime error if an invalid combination is given.
|
||||||
*/
|
*/
|
||||||
std::string GetChainName() const;
|
std::string GetChainName() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user