Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/tx_verify.cpp
Show All 40 Lines | bool ContextualCheckTransaction(const Config &config, const CTransaction &tx, | ||||
int64_t nMedianTimePast) { | int64_t nMedianTimePast) { | ||||
if (!IsFinalTx(tx, nHeight, nLockTimeCutoff)) { | if (!IsFinalTx(tx, nHeight, nLockTimeCutoff)) { | ||||
// While this is only one transaction, we use txns in the error to | // While this is only one transaction, we use txns in the error to | ||||
// ensure continuity with other clients. | // ensure continuity with other clients. | ||||
return state.DoS(10, false, REJECT_INVALID, "bad-txns-nonfinal", false, | return state.DoS(10, false, REJECT_INVALID, "bad-txns-nonfinal", false, | ||||
"non-final transaction"); | "non-final transaction"); | ||||
} | } | ||||
if (IsMagneticAnomalyEnabled(config, nMedianTimePast)) { | if (IsMagneticAnomalyEnabled(config, nHeight)) { | ||||
// Size limit | // Size limit | ||||
if (::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) < | if (::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) < | ||||
MIN_TX_SIZE) { | MIN_TX_SIZE) { | ||||
return state.DoS(100, false, REJECT_INVALID, "bad-txns-undersize"); | return state.DoS(100, false, REJECT_INVALID, "bad-txns-undersize"); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
▲ Show 20 Lines • Show All 275 Lines • Show Last 20 Lines |