Replace std::string PaymentServer::mapNetworkIdToName and CChainParams::… #4333
pull jtimon wants to merge 2 commits into bitcoin:master from jtimon:netname changing 5 files +5 −9-
jtimon commented at 11:15 am on June 12, 2014: contributor
-
in src/rpcmisc.cpp: in 81849b1717 outdated
72@@ -73,7 +73,7 @@ Value getinfo(const Array& params, bool fHelp) 73 obj.push_back(Pair("connections", (int)vNodes.size())); 74 obj.push_back(Pair("proxy", (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string()))); 75 obj.push_back(Pair("difficulty", (double)GetDifficulty())); 76- obj.push_back(Pair("testnet", Params().RPCisTestNet())); 77+ obj.push_back(Pair("network", Params().NetworkIDString()));
laanwj commented at 11:20 am on June 12, 2014:Please don’t change thegetinfo
call, too many people rely on its current behavior. As it’s a random grabbag of information from different parts, it’s going to be deprecated at some point in favor of the more specific get*info calls.jtimon commented at 11:41 am on June 12, 2014: contributorRebased on top of Diapolo:clientmodel_networkname So maybe I should maintain the testnet field and add the network one? Maybe I can leave “Params().NetworkID() == CChainParams::TESTNET” there and still get rid of the RPCisTestnet param…jtimon commented at 11:52 am on June 12, 2014: contributorOh, I was coding it and didn’t read you. So should I just cancel the last commit then?laanwj commented at 11:55 am on June 12, 2014: memberYes. We can remove them at a later time when there is a a RPC overhaul with other backwards-compat breaking changes.jtimon commented at 12:00 pm on June 12, 2014: contributorAdding the “network” field doesn’t seem backwards incompatible, but it allows people to start using that instead of “testnet”, which could be declared deprecated or something to encourage people to move already in preparation for that RPC overhaul. That’s why I ask if I should remove https://github.com/jtimon/bitcoin/commit/bdb2f8ee844b20f40397c2cb2937cd7d23a2d247
Thoughts?
laanwj commented at 12:02 pm on June 12, 2014: memberI’m fine with adding it togetmininginfo
. But don’t touchgetinfo
. It should die.Diapolo commented at 12:04 pm on June 12, 2014: nonePerhaps 0.10 is a good release for killing getinfo :)?jtimon commented at 12:17 pm on June 12, 2014: contributorOk, done. I didn’t know getinfo was meant to die. Maybe it makes sense to add it in other places besides getmininginfo? I only considered those two because only them had the “testnet” field.laanwj commented at 12:21 pm on June 12, 2014: memberWellgetblockchaininfo
andgetmininginfo
have it now, I’d guess that is enough.jtimon commented at 12:36 pm on June 12, 2014: contributoroh, I see. Probably I should use “chain” instead of “network” and the help could be uniform too. Maybe it should be: " "chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest)\n" instead of " "chain": "xxxx", (string) current chain (main, testnet3, regtest)\n"
but the change in #4326 doesn’t seem backwards compatible (it’s going to return “test” instead of “testnet3” [by the way, that shouldn’t had changed in bip70 given that this “chain” was here already]). So maybe it’s better to just keep “chain” as it was, and include the new “network” parameter.
Thoughts?
jtimon commented at 12:48 pm on June 12, 2014: contributorGood. Then I will use chain as well, and correct the help info in getblockchaininfolaanwj commented at 8:00 am on June 17, 2014: memberNeeds rebaseGet rid of Params().RPCisTestNet() b82b7ec3dcAdd "chain" to getmininginfo, improve help in getblockchaininfo f6984e8141jtimon commented at 11:14 am on June 17, 2014: contributorRebasedBitcoinPullTester commented at 11:46 am on June 17, 2014: noneAutomatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/f6984e814134d2383e1353ce8aa951649f5fcbd2 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.laanwj merged this on Jun 17, 2014laanwj closed this on Jun 17, 2014
laanwj referenced this in commit 2151419b1b on Jun 17, 2014jtimon deleted the branch on Jun 18, 2014MarcoFalke locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC
More mirrored repositories can be found on mirror.b10c.me