This replaces VERSION with PROTOCOL_VERSION (defined in serialize.h) and CLIENT_VERSION (defined in main.h).
I also define CLIENT_NAME as either “bitcoind” or “bitcoin-qt” in main.h.
The getinfo() RPC command returns CLIENT_VERSION as “version” (same as before) and PROTOCOL_VERSION as “protocolversion” (new).
CLIENT_VERSION is recorded in the wallet.dat as “version”.
And PROTOCOL_VERSION is used for all the network serialization stuff.
There is a TODO here related to the CAlert feature, but doing it will require more thought/work. And I’ve got another change to CAlert (give testnet its own alert keypair) that’ll be a good time to change it.
I decided against new command-line arguments / bitcoin.conf options to make it really easy to override the CLIENT_NAME or CLIENT_VERSION reported to peers; those would be easy-to-add-later features.