This removes the warning in debug.log when a value fails to parse correctly.
Removes the last dependency from walletdb.cpp on CWallet.
I'm not sure this is a good idea, but the circular dependency being removed finally is nice.
This removes the warning in debug.log when a value fails to parse correctly.
Removes the last dependency from walletdb.cpp on CWallet.
I'm not sure this is a good idea, but the circular dependency being removed finally is nice.
This removes the warning in debug.log when a value fails to parse correctly.
Removes the last dependency from walletdb.cpp on CWallet.
904 | - continue; 905 | - } 906 | + ssKey >> strType; 907 | + if (!IsKeyType(strType) && strType != "hdchain") 908 | + continue; 909 | + }catch(...){continue;}
Please add a warning when this fails, don't ignore failures here silently.
889 | - string strType, strErr; 890 | - bool fReadOK; 891 | - { 892 | - // Required in LoadKeyMetadata(): 893 | - LOCK(dummyWallet.cs_wallet); 894 | - fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue,
Not sure about this. Removing the actual deserialization routing may result in not actually checking the correctness of the data. For example, currently each "key" record (pub- & priv-key), is checked in ReadKeyValue() with vchPubKey.IsValid(), also, corrupt keys or a corrupt hdchain dataset will be detected now (log output) , but not after this PR.
@jonasschnelli indeed that is why I'm not sure it's a good idea.
Concept ACK. I don't think that the attempt to parse the data is a particularly strong check anyway.
Needs a rebase/nits addressed.
NAK Looks like the method this PR modified no longer operates in the same way. ReadKeyValue() is no longer called, instead we call some callback if it's registered.
It does not appear that this PR can be applied to the current code in any way. I believe it can be closed.
This was superceeded by the split between db.cpp and walletdb.cpp - db.cpp already has no other wallet dependancies.