Bitcoin full node and query server

Mar 7, 2025

View in context in the libbitcoin Slack #general mirror.

evoskuil19:25
the hashmap head. the hash function for the point table is a std::hash combine of the tx.hash and the index. the hash of the tx.hash is the first 4 bytes.
evoskuil19:45
template <size_t Size>
INLINE constexpr size_t unique_hash(const data_array<Size>& key) NOEXCEPT
{
    constexpr auto size = std::min(Size, sizeof(size_t));

    // This optimization breaks data portability (by endianness).
    // Could be modified to use an endian conversion vs. simple copy.
    size_t value{};
    std::copy_n(key.begin(), size, system::byte_cast(value).begin());
    return value;
}