Skip to content

Conversation

@jtimon
Copy link
Contributor

@jtimon jtimon commented Jun 12, 2014

related to #4326 and #3824

src/rpcmisc.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change the getinfo 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.

@Diapolo
Copy link

Diapolo commented Jun 12, 2014

Can you rebase this onto #4326?

@jtimon
Copy link
Contributor Author

jtimon commented Jun 12, 2014

Rebased 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...

@laanwj
Copy link
Member

laanwj commented Jun 12, 2014

@jtimon Yes, Params().NetworkID() == CChainParams::TESTNET is clearer than RPCIsTestnet. But please keep the RPC interface the same for now.

@jtimon
Copy link
Contributor Author

jtimon commented Jun 12, 2014

Oh, I was coding it and didn't read you. So should I just cancel the last commit then?

@laanwj
Copy link
Member

laanwj commented Jun 12, 2014

Yes. We can remove them at a later time when there is a a RPC overhaul with other backwards-compat breaking changes.

@jtimon
Copy link
Contributor Author

jtimon commented Jun 12, 2014

Adding 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 jtimon@bdb2f8e

Thoughts?

@laanwj
Copy link
Member

laanwj commented Jun 12, 2014

I'm fine with adding it to getmininginfo. But don't touch getinfo. It should die.

@Diapolo
Copy link

Diapolo commented Jun 12, 2014

Perhaps 0.10 is a good release for killing getinfo :)?

@laanwj
Copy link
Member

laanwj commented Jun 12, 2014

@Diapolo I'd rather wait another major release (eg: 0.10 deprecates it, 0.11 removes it). But I don't want that discussion now.

@jtimon
Copy link
Contributor Author

jtimon commented Jun 12, 2014

Ok, 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
Copy link
Member

laanwj commented Jun 12, 2014

Well getblockchaininfo and getmininginfo have it now, I'd guess that is enough.

@jtimon
Copy link
Contributor Author

jtimon commented Jun 12, 2014

oh, 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?

@laanwj
Copy link
Member

laanwj commented Jun 12, 2014

@jtimon chain is very new, there is IMO no problem changing the values there.

@jtimon
Copy link
Contributor Author

jtimon commented Jun 12, 2014

Good. Then I will use chain as well, and correct the help info in getblockchaininfo

@laanwj
Copy link
Member

laanwj commented Jun 17, 2014

Needs rebase

@jtimon
Copy link
Contributor Author

jtimon commented Jun 17, 2014

Rebased

@BitcoinPullTester
Copy link

Automatic 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 laanwj merged commit f6984e8 into bitcoin:master Jun 17, 2014
laanwj added a commit that referenced this pull request Jun 17, 2014
f6984e8 Add "chain" to getmininginfo, improve help in getblockchaininfo (jtimon)
b82b7ec Get rid of Params().RPCisTestNet() (jtimon)
@jtimon jtimon deleted the netname branch June 18, 2014 18:16
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants