Following an IRC conversation today, this patch proposes to persist CLIENT_VERSION as "lastrunversion" to the settings.json file on shutdown.
This allows, for example, to detect if the user upgraded with code like
if (CLIENT_VERSION > chain.getRwSetting("lastrunversion").get_int())
so as to take various actions.
Reviewers, this patch can be tested manually by opening <datadir>/signet/settings.json in your editor, starting and stopping signet, and watching the file be updated. One can also manually edit the setting and verify that the version is updated on shutdown.
{
"lastrunversion": 219900,
"wallet": [
""
]
}