Remove ReadVersion and WriteVersion

The "version" record that these functions read and write are not
used anywhere in the code except for one place. There is no reason
to expose these functions publicly. Furthermore, this avoids potential
confusion as developers may mistake these functions for actually
reading and writing the wallet version when they do not.
This commit is contained in:
Andrew Chow
2019-03-13 00:44:52 -04:00
parent b3d4f6c961
commit 35e60e790f
4 changed files with 3 additions and 28 deletions

View File

@@ -587,7 +587,7 @@ BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const char* pszMode, bo
if (fCreate && !Exists(std::string("version"))) {
bool fTmp = fReadOnly;
fReadOnly = false;
WriteVersion(CLIENT_VERSION);
Write(std::string("version"), CLIENT_VERSION);
fReadOnly = fTmp;
}
}