Fix compilation error in fuzz code after the wallet refactoring
This PR introduces fuzz tests and address #592