6 #ifndef BITCOIN_PRIMITIVES_TRANSACTION_H 7 #define BITCOIN_PRIMITIVES_TRANSACTION_H 26 template <
typename Stream,
typename Operation>
27 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
103 template <
typename Stream,
typename Operation>
104 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
149 template <
typename Stream,
typename Operation>
150 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion) {
233 const std::vector<CTxIn>
vin;
234 const std::vector<CTxOut>
vout;
247 template <
typename Stream,
typename Operation>
249 READWRITE(*const_cast<int32_t*>(&this->nVersion));
254 if (ser_action.ForRead())
259 return vin.empty() &&
vout.empty();
272 double ComputePriority(
double dPriorityInputs,
unsigned int nTxSize=0)
const;
286 return (
vin.size() == 1 &&
vin[0].prevout.IsNull());
315 template <
typename Stream,
typename Operation>
355 typedef std::reverse_iterator<const unsigned char*> rev_it;
356 rev_it rita = rev_it(hasha.
end());
357 rev_it ritb = rev_it(hashb.
end());
359 return std::lexicographical_compare(rita, rita + hasha.
size(), ritb, ritb + hashb.
size());
371 #endif // BITCOIN_PRIMITIVES_TRANSACTION_H
friend bool operator!=(const COutPoint &a, const COutPoint &b)
static const int32_t CURRENT_VERSION
double ComputePriority(double dPriorityInputs, unsigned int nTxSize=0) const
friend bool operator==(const CTxOut &a, const CTxOut &b)
static const uint32_t SEQUENCE_FINAL
std::string ToString() const
CAmount GetFee(size_t size) const
CAmount GetValueOut() const
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
static const uint32_t SEQUENCE_LOCKTIME_MASK
friend bool operator<(const COutPoint &a, const COutPoint &b)
bool IsUnspendable() const
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
unsigned int GetTotalSize() const
bool operator()(const CTxOut &a, const CTxOut &b) const
unsigned int GetSerializeSize(char a, int, int=0)
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
std::string ToString() const
friend bool operator!=(const CMutableTransaction &a, const CMutableTransaction &b)
friend bool operator==(const CTransaction &a, const CTransaction &b)
friend bool operator!=(const CTxOut &a, const CTxOut &b)
unsigned int size() const
friend bool operator==(const CTxIn &a, const CTxIn &b)
friend bool operator<(const CTxIn &a, const CTxIn &b)
static const int SEQUENCE_LOCKTIME_GRANULARITY
std::vector< CTxOut > vout
unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const
const std::vector< CTxIn > vin
static const int32_t MAX_STANDARD_VERSION
bool IsDust(const CFeeRate &minRelayTxFee) const
std::string ToString() const
friend bool operator==(const CMutableTransaction &a, const CMutableTransaction &b)
std::string ToString() const
const uint256 & GetHash() const
std::string ToString() const
friend bool operator!=(const CTxIn &a, const CTxIn &b)
const std::vector< CTxOut > vout
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
CTransaction & operator=(const CTransaction &tx)
static const uint32_t SEQUENCE_LOCKTIME_TYPE_FLAG
COutPoint(uint256 hashIn, uint32_t nIn)
static const uint32_t SEQUENCE_LOCKTIME_DISABLE_FLAG
friend bool operator!=(const CTransaction &a, const CTransaction &b)
std::string ToStringShort() const
friend bool operator==(const COutPoint &a, const COutPoint &b)
CAmount GetDustThreshold(const CFeeRate &minRelayTxFee) const
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)