1 #ifndef BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H 2 #define BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H 10 template <
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()); }
75 #endif // BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H std::string GetHex() const
constexpr const std::byte * end() const
constexpr const std::byte * begin() const
void Serialize(Stream &s) const
void Serialize(Stream &s) const
constexpr int Compare(const Other &other) const
constexpr unsigned char * begin()
constexpr int Compare(const uint256 &other) const
bool operator!=(const Other &other) const
void Unserialize(Stream &s)
static std::optional< uint256 > FromHex(std::string_view str)
std::string ToString() const
bool operator==(const Other &other) const
transaction_identifier(const uint256 &wrapped)
std::string ToString() const
constexpr const std::byte * data() const
constexpr bool IsNull() const
constexpr int Compare(const base_blob &other) const
Lexicographic ordering.
constexpr int Compare(const transaction_identifier< has_witness > &other) const
constexpr const unsigned char * data() const
static transaction_identifier FromUint256(const uint256 &id)
constexpr unsigned char * end()
std::string GetHex() const
constexpr bool IsNull() const
Wrapped uint256 methods.
const uint256 & ToUint256() const LIFETIMEBOUND
static constexpr auto size()
void Unserialize(Stream &s)
static std::optional< transaction_identifier > FromHex(std::string_view hex)
transaction_identifier represents the two canonical transaction identifier types (txid, wtxid).
bool operator<(const Other &other) const