Skip to content

Commit 463eab5

Browse files
committed
Merge #17285: doc: Bip70 removal follow-up
3ed8e3d doc: Remove explicit network name references (Fabian Jahr) d6e493f 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 3ed8e3d Tree-SHA512: 9a7c0b9cacbb67bd31a089ffdc6f1ebc7f336493e2c8266eb697da34dce2b505a431d5639a3e4fc34f9287361343e861b55dc2662e0a1d2095cc1046db77d6ee
2 parents 9641366 + 3ed8e3d commit 463eab5

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed

doc/REST-interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Given a height: returns hash of block in best-block-chain at height provided.
5050

5151
Returns various state info regarding block chain processing.
5252
Only supports JSON as output format.
53-
* chain : (string) current network name as defined in BIP70 (main, test, regtest)
53+
* chain : (string) current network name (main, test, regtest)
5454
* blocks : (numeric) the current number of blocks processed in the server
5555
* headers : (numeric) the current number of headers we have validated
5656
* bestblockhash : (string) the hash of the currently best block

src/chainparams.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class CChainParams
7575
uint64_t AssumedChainStateSize() const { return m_assumed_chain_state_size; }
7676
/** Whether it is possible to mine blocks on demand (no retargeting) */
7777
bool MineBlocksOnDemand() const { return consensus.fPowNoRetargeting; }
78-
/** Return the BIP70 network string (main, test or regtest) */
78+
/** Return the network string */
7979
std::string NetworkIDString() const { return strNetworkID; }
8080
/** Return the list of hostnames to look up for DNS seeds */
8181
const std::vector<std::string>& DNSSeeds() const { return vSeeds; }
@@ -120,7 +120,7 @@ std::unique_ptr<const CChainParams> CreateChainParams(const std::string& chain);
120120
const CChainParams &Params();
121121

122122
/**
123-
* Sets the params returned by Params() to those for the given BIP70 chain name.
123+
* Sets the params returned by Params() to those for the given chain name.
124124
* @throws std::runtime_error when the chain is not supported.
125125
*/
126126
void SelectParams(const std::string& chain);

src/chainparamsbase.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
class CBaseChainParams
1616
{
1717
public:
18-
/** BIP70 chain name strings (main, test or regtest) */
18+
///@{
19+
/** Chain name strings */
1920
static const std::string MAIN;
2021
static const std::string TESTNET;
2122
static const std::string REGTEST;
23+
///@}
2224

2325
const std::string& DataDir() const { return strDataDir; }
2426
int RPCPort() const { return nRPCPort; }

src/qt/networkstyle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class NetworkStyle
1414
{
1515
public:
16-
/** Get style associated with provided BIP70 network id, or 0 if not known */
16+
/** Get style associated with provided network id, or 0 if not known */
1717
static const NetworkStyle* instantiate(const std::string& networkId);
1818

1919
const QString &getAppName() const { return appName; }

src/qt/walletmodel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class SendCoinsRecipient
6464
CAmount amount;
6565
// If from a payment request, this is used for storing the memo
6666
QString message;
67-
// If building with BIP70 is disabled, keep the payment request around as
68-
// serialized string to ensure load/store is lossless
67+
// Keep the payment request around as a serialized string to ensure
68+
// load/store is lossless.
6969
std::string sPaymentRequest;
7070
// Empty if no authentication or invalid signature/cert/etc.
7171
QString authenticatedMerchant;

src/rpc/blockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
11911191
{},
11921192
RPCResult{
11931193
"{\n"
1194-
" \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n"
1194+
" \"chain\": \"xxxx\", (string) current network name (main, test, regtest)\n"
11951195
" \"blocks\": xxxxxx, (numeric) the height of the most-work fully-validated chain. The genesis block has height 0\n"
11961196
" \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n"
11971197
" \"bestblockhash\": \"...\", (string) the hash of the currently best block\n"

src/rpc/mining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static UniValue getmininginfo(const JSONRPCRequest& request)
233233
" \"difficulty\": xxx.xxxxx (numeric) The current difficulty\n"
234234
" \"networkhashps\": nnn, (numeric) The network hashes per second\n"
235235
" \"pooledtx\": n (numeric) The size of the mempool\n"
236-
" \"chain\": \"xxxx\", (string) current network name as defined in BIP70 (main, test, regtest)\n"
236+
" \"chain\": \"xxxx\", (string) current network name (main, test, regtest)\n"
237237
" \"warnings\": \"...\" (string) any network and blockchain warnings\n"
238238
"}\n"
239239
},

src/util/system.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class ArgsManager
265265
void ForceSetArg(const std::string& strArg, const std::string& strValue);
266266

267267
/**
268-
* Looks for -regtest, -testnet and returns the appropriate BIP70 chain name.
268+
* Returns the appropriate chain name from the program arguments.
269269
* @return CBaseChainParams::MAIN by default; raises runtime error if an invalid combination is given.
270270
*/
271271
std::string GetChainName() const;

0 commit comments

Comments
 (0)