fix serialization being different on mac

On Mac, size_t is a distinct type from uint64_t, and some
types (in wallet cache as well as cold/hot wallet transfer
data) use pairs/containers with size_t as fields. Mac would
save those as full size, while other platforms would save
them as varints. Might apply to other platforms where the
types are distinct.

There's a nasty hack for backward compatibility, which can
go after a couple forks.
This commit is contained in:
moneromooo-monero 2021-01-12 18:24:55 +00:00
parent b8f3e44a3f
commit f9b5b521e8
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
9 changed files with 64 additions and 27 deletions

View file

@ -51,7 +51,7 @@ END_INIT_SIMPLE_FUZZER()
BEGIN_SIMPLE_FUZZER()
std::string s((const char*)buf, len);
std::pair<size_t, std::vector<tools::wallet2::transfer_details>> outputs;
std::pair<uint64_t, std::vector<tools::wallet2::transfer_details>> outputs;
std::stringstream iss;
iss << s;
binary_archive<false> ar(iss);