Pull request to Bitcoin
-
I am about to make my first pull request to Bitcoin, x fingers … Based on an work I’m doing for Feathercoin regtest commit :
https://github.com/bitcoin/bitcoin/pull/11142
< Bitcoin-cli getinfo > outputs information such as whether the testnet is true. This change adds regtest to the list.
/src/rpc/misc.cpp BTC 0.15.x
+ " \"regtest\": true|false, (boolean) if the server is using regtest or not\n" + obj.push_back(Pair("regtest", Params().NetworkIDString() == CBaseChainParams::REGTEST));
Reply
getinfo is being deprecated they said look to do it here instead :
Based on the source of the information, new information should be added to: getblockchaininfo, getnetworkinfo or getwalletinfo
I’ve will add it to 0.9.6.x and 0.11.2 : the state condition is slightly changed.
obj.push_back(Pair("regtest", RegTest()));
New getinfo output in regtest mode :
{ "version" : 90602, "protocolversion" : 70006, "walletversion" : 60000, "balance" : 0.00000000, "blocks" : 3, "timeoffset" : 0, "connections" : 0, "proxy" : "", "difficulty" : 0.00000000, "testnet" : false, "regtest" : true, "keypoololdest" : 1503683535, "keypoolsize" : 101, "paytxfee" : 0.00000000, "relayfee" : 0.01000000, "errors" : "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications" }
-
Thanks for your work. Hope you’re not upset about them not appreciating it.
-
I’m fine, I’ll find one they accept, one day …