Introduce explicit -walletupgrade option
authorPieter Wuille <pieter.wuille@gmail.com>
Thu, 22 Mar 2012 02:56:31 +0000 (03:56 +0100)
committerPieter Wuille <pieter.wuille@gmail.com>
Thu, 22 Mar 2012 22:47:29 +0000 (23:47 +0100)
commit439e1497e130914c2b78eff20c38046d6b1b6d49
tree20eef7dba2044093e6a92fdce3f5a62c16f62840
parent4a17e3e6b947d6ede40e49f77244d880240240cd
Introduce explicit -walletupgrade option

Do not automatically change the wallet format unless the user takes an
explicit action that implies an upgrade (encrypting, for now), or uses
-walletupgrade.

-walletupgrade optionally takes an integer argument: the client version
up to which upgrading is allowed. Without an argument, it is upgraded
to latest supported version. If an argument to -walletupgrade is
provided at the time the wallet is created, the new wallet will initially
not use features beyond that version.

Third, the current wallet version number is reported in getinfo.
src/bitcoinrpc.cpp
src/init.cpp
src/wallet.cpp
src/wallet.h