Olivier Langlois [ARCHIVE] on Nostr: 📅 Original date posted:2013-10-04 📝 Original message:> Upon looking at the ...
📅 Original date posted:2013-10-04
📝 Original message:> Upon looking at the 0.8.5 & earlier code for CDB:Rewrite(), in the
> files db.h and db.cpp, you will notice that in db.h it is declared
> bool static, but in db.cpp it isn't. Is this a problem? Or a feature?
> Or nothing at all?
It is perfect C++ code.
> Furthermore, it is called only in wallet.cpp
> -->CWallet::EncryptWallet() but its return value is ignored? Again,
> intentional or a bug or a feature or a ...?
possibly a minor bug. Minor because over 99% of the time it is called, the Rewrite() function will succeed.
Maybe CWallet::EncryptWallet() should return false to its callers when
CDB::Rewrite fails.
📝 Original message:> Upon looking at the 0.8.5 & earlier code for CDB:Rewrite(), in the
> files db.h and db.cpp, you will notice that in db.h it is declared
> bool static, but in db.cpp it isn't. Is this a problem? Or a feature?
> Or nothing at all?
It is perfect C++ code.
> Furthermore, it is called only in wallet.cpp
> -->CWallet::EncryptWallet() but its return value is ignored? Again,
> intentional or a bug or a feature or a ...?
possibly a minor bug. Minor because over 99% of the time it is called, the Rewrite() function will succeed.
Maybe CWallet::EncryptWallet() should return false to its callers when
CDB::Rewrite fails.