mirror of https://github.com/oxen-io/oxen-core.git
Remove redundant size checks
These were needed with oxenmq::is_hex a long time ago, but have been redundant for quite a while.
This commit is contained in:
parent
4fa12395ef
commit
5e578069d6
|
@ -6645,7 +6645,7 @@ bool simple_wallet::ons_update_mapping(std::vector<std::string> args)
|
|||
}
|
||||
|
||||
auto& enc_hex = response[0].encrypted_value;
|
||||
if (!oxenc::is_hex(enc_hex) || enc_hex.size() % 2 != 0 || enc_hex.size() > 2*ons::mapping_value::BUFFER_SIZE)
|
||||
if (!oxenc::is_hex(enc_hex) || enc_hex.size() > 2*ons::mapping_value::BUFFER_SIZE)
|
||||
{
|
||||
LOG_ERROR("invalid ONS data returned from oxend");
|
||||
fail_msg_writer() << tr("invalid ONS data returned from oxend");
|
||||
|
@ -6887,7 +6887,7 @@ bool simple_wallet::ons_lookup(std::vector<std::string> args)
|
|||
for (auto const &mapping : response)
|
||||
{
|
||||
auto& enc_hex = mapping.encrypted_value;
|
||||
if (mapping.entry_index >= args.size() || !oxenc::is_hex(enc_hex) || enc_hex.size() % 2 != 0 || enc_hex.size() > 2*ons::mapping_value::BUFFER_SIZE)
|
||||
if (mapping.entry_index >= args.size() || !oxenc::is_hex(enc_hex) || enc_hex.size() > 2*ons::mapping_value::BUFFER_SIZE)
|
||||
{
|
||||
fail_msg_writer() << "Received invalid ONS mapping data from oxend";
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue