Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/cryptonote_core/beldex_name_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ bool bind_container(sql_compiled_statement& s, const Container& c)
/// Retrieve a type from an executed statement.

// Small (<=32 bits) integers
template <typename T, std::enable_if_t<std::is_integral_v<T> && (sizeof(T) <= 32), int> = 0>
template <typename T, std::enable_if_t<std::is_integral_v<T> && (sizeof(T) <= 4), int> = 0>
T get(sql_compiled_statement& s, int index) { return static_cast<T>(sqlite3_column_int(s.statement, index)); }

// Big (>32 bits) integers
template <typename T, std::enable_if_t<std::is_integral_v<T> && (sizeof(T) > 32), int> = 0>
template <typename T, std::enable_if_t<std::is_integral_v<T> && (sizeof(T) > 4), int> = 0>
T get(sql_compiled_statement& s, int index) { return static_cast<T>(sqlite3_column_int64(s.statement, index)); }

// Floats/doubles
Expand Down Expand Up @@ -1581,10 +1581,10 @@ mapping_value mapping_value::make_encrypted(std::string_view name, const crypto:
return result;
}

mapping_value mapping_value::make_decrypted(std::string_view name, const crypto::hash* name_hash) const
mapping_value mapping_value::make_decrypted(std::string_view name, mapping_type type, const crypto::hash* name_hash) const
{
mapping_value result{*this};
result.encrypt(name, name_hash);
result.decrypt(name, type, name_hash);
assert(!result.encrypted);
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cryptonote_core/beldex_name_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ struct mapping_value

// Makes a copy of *this, calls decrypt() on it, and returns it. Unlike decrypt(), this call
// leaves `*this` encrypted and instead returns an decrypted copy.
mapping_value make_decrypted(std::string_view name, const crypto::hash* name_hash = nullptr) const;
mapping_value make_decrypted(std::string_view name, mapping_type type, const crypto::hash* name_hash = nullptr) const;

std::optional<cryptonote::address_parse_info> get_wallet_address_info() const;

Expand Down
Loading