oxen-core icon indicating copy to clipboard operation
oxen-core copied to clipboard

Correct cache behavior for multiple ONS name lookups.

Open saravananp-001 opened this issue 2 years ago • 1 comments

When multiple ONS names are provided in the lookup, the data is consistently updated in cache using the first name_hash instead of being appended with a new name_hash each time.

saravananp-001 avatar Sep 06 '23 07:09 saravananp-001

Thanks for the PR!

Is this compiling? Seeing this error in the CI

/drone/src/src/simplewallet/simplewallet.cpp: In member function 'bool cryptonote::simple_wallet::ons_lookup(std::vector<std::__cxx11::basic_string<char> >)':

/drone/src/src/simplewallet/simplewallet.cpp:7199:25: error: 'const class nlohmann::basic_json<>' has no member named 'name_hash'

 7199 |                 mapping.name_hash};

I suspect the difference is probably just needing to be mapping["name_hash"] as the json struct behaves differently to a regular c++ struct

darcys22 avatar Sep 07 '23 00:09 darcys22