How does salvagewallet work? What can I expect using the salvagewallet command?
What is it actually doing?

I am asking specifically about the zcoin fork, if that matters.
How can this help with corrupted wallet?
How can Wallets become corrupted in the first place?
zcoin seems to be a fork of Bitcoin Core.

Bitcoin Core's -salvagewallet does carefully try to recover a broken wallet database (wallet.dat file).

What it does is:


Copy the wallet.dat file (wallet.&lt;date&gt;.bak)
Tries to recover only the private keys


Make sure you check your debug.log after -salvagewallet wallet operation.
Look for lines starting with "Salvage" to get more information.