1#ifndef BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H
2#define BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H
10template <
bool has_witness>
22 template <
typename Other>
23 constexpr int Compare(
const Other& other)
const
25 static_assert(ALWAYS_FALSE<Other>,
"Forbidden comparison type");
32 template <
typename Other>
34 template <
typename Other>
36 template <
typename Other>
45 static std::optional<transaction_identifier>
FromHex(std::string_view hex)
48 if (!u)
return std::nullopt;
54 constexpr const std::byte*
data()
const {
return reinterpret_cast<const std::byte*
>(
m_wrapped.
data()); }
55 constexpr const std::byte*
begin()
const {
return reinterpret_cast<const std::byte*
>(
m_wrapped.
begin()); }
56 constexpr const std::byte*
end()
const {
return reinterpret_cast<const std::byte*
>(
m_wrapped.
end()); }
constexpr bool IsNull() const
constexpr unsigned char * end()
void Unserialize(Stream &s)
std::string ToString() const
constexpr int Compare(const base_blob &other) const
Lexicographic ordering.
constexpr unsigned char * begin()
void Serialize(Stream &s) const
std::string GetHex() const
constexpr const unsigned char * data() const
transaction_identifier represents the two canonical transaction identifier types (txid,...
std::string ToString() const
static constexpr auto size()
void Unserialize(Stream &s)
void Serialize(Stream &s) const
constexpr const std::byte * begin() const
const uint256 & ToUint256() const LIFETIMEBOUND
constexpr bool IsNull() const
Wrapped uint256 methods.
transaction_identifier(const uint256 &wrapped)
bool operator<(const Other &other) const
bool operator==(const Other &other) const
constexpr int Compare(const Other &other) const
std::string GetHex() const
bool operator!=(const Other &other) const
constexpr int Compare(const uint256 &other) const
constexpr const std::byte * data() const
static transaction_identifier FromUint256(const uint256 &id)
constexpr const std::byte * end() const
constexpr int Compare(const transaction_identifier< has_witness > &other) const
static std::optional< transaction_identifier > FromHex(std::string_view hex)
static std::optional< uint256 > FromHex(std::string_view str)