23 for (
const auto& txout : tx.
vout)
29 nValueOut += txout.nValue;
39 std::set<COutPoint> vInOutPoints;
40 for (
const auto& txin : tx.
vin) {
41 if (!vInOutPoints.insert(txin.prevout).second)
47 if (tx.
vin[0].scriptSig.size() < 2 || tx.
vin[0].scriptSig.size() > 100)
52 for (
const auto& txin : tx.
vin)
53 if (txin.prevout.IsNull())
static const int SERIALIZE_TRANSACTION_NO_WITNESS
A flag that is ORed into the protocol version to designate that a transaction should be (un)serialize...
invalid by consensus rules
static const int WITNESS_SCALE_FACTOR
static const CAmount MAX_MONEY
No amount larger than this (in satoshi) is valid.
bool MoneyRange(const CAmount &nValue)
const std::vector< CTxIn > vin
size_t GetSerializeSize(const T &t, int nVersion=0)
static const unsigned int MAX_BLOCK_WEIGHT
The maximum allowed weight for a block, see BIP 141 (network rule)
int64_t CAmount
Amount in satoshis (Can be negative)
bool Invalid(Result result, const std::string &reject_reason="", const std::string &debug_message="")
const std::vector< CTxOut > vout
static const int PROTOCOL_VERSION
network protocol versioning
The basic transaction that is broadcasted on the network and contained in blocks. ...
bool CheckTransaction(const CTransaction &tx, TxValidationState &state)