25 for (
const auto& txout : tx.
vout)
31 nValueOut += txout.nValue;
41 std::set<COutPoint> vInOutPoints;
42 for (
const auto& txin : tx.
vin) {
43 if (!vInOutPoints.insert(txin.prevout).second)
49 if (tx.
vin[0].scriptSig.size() < 2 || tx.
vin[0].scriptSig.size() > 100)
54 for (
const auto& txin : tx.
vin)
55 if (txin.prevout.IsNull())
static constexpr CAmount MAX_MONEY
No amount larger than this (in satoshi) is valid.
bool MoneyRange(const CAmount &nValue)
int64_t CAmount
Amount in satoshis (Can be negative)
The basic transaction that is broadcasted on the network and contained in blocks.
const std::vector< CTxOut > vout
const std::vector< CTxIn > vin
bool Invalid(Result result, const std::string &reject_reason="", const std::string &debug_message="")
@ TX_CONSENSUS
invalid by consensus rules
static const unsigned int MAX_BLOCK_WEIGHT
The maximum allowed weight for a block, see BIP 141 (network rule)
static const int WITNESS_SCALE_FACTOR
static constexpr TransactionSerParams TX_NO_WITNESS
size_t GetSerializeSize(const T &t)
bool CheckTransaction(const CTransaction &tx, TxValidationState &state)