src/primitives/transaction.hpp
Namespaces
Classes
Functions
|
Name |
| bool |
operator==(const Transaction & v1, const Transaction & v2) |
Functions Documentation
function operator==
inline bool operator==(
const Transaction & v1,
const Transaction & v2
)
Source code
#ifndef SUPERGENIUS_TRANSACTION_HPP
#define SUPERGENIUS_TRANSACTION_HPP
#include "base/blob.hpp"
#include "primitives/extrinsic.hpp"
namespace sgns::primitives {
struct Transaction {
using Hash = base::Hash256;
using Priority = uint64_t;
using Longevity = uint64_t;
using Tag = std::vector<uint8_t>;
Extrinsic ext;
size_t bytes{};
Hash hash;
Priority priority{};
Longevity valid_till{};
std::vector<Tag> requires;
std::vector<Tag> provides;
bool should_propagate{false};
friend std::ostream &operator<<(std::ostream &out, const Transaction &test_struct)
{
return out;
}
};
inline bool operator==(const Transaction &v1, const Transaction &v2) {
return v1.ext == v2.ext && v1.bytes == v2.bytes && v1.hash == v2.hash
&& v1.priority == v2.priority && v1.valid_till == v2.valid_till
&& v1.requires == v2.requires && v1.provides == v2.provides
&& v1.should_propagate == v2.should_propagate;
}
} // namespace sgns::primitives
#endif // SUPERGENIUS_TRANSACTION_HPP
Updated on 2026-03-04 at 13:10:44 -0800