Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/tx_verify.cpp
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
bool SequenceLocks(const CTransaction &tx, int flags, | bool SequenceLocks(const CTransaction &tx, int flags, | ||||
std::vector<int> *prevHeights, const CBlockIndex &block) { | std::vector<int> *prevHeights, const CBlockIndex &block) { | ||||
return EvaluateSequenceLocks( | return EvaluateSequenceLocks( | ||||
block, CalculateSequenceLocks(tx, flags, prevHeights, block)); | block, CalculateSequenceLocks(tx, flags, prevHeights, block)); | ||||
} | } | ||||
uint64_t GetSigOpCountWithoutP2SH(const CTransaction &tx, uint32_t flags) { | |||||
return 0; | |||||
} | |||||
uint64_t GetP2SHSigOpCount(const CTransaction &tx, const CCoinsViewCache &view, | |||||
uint32_t flags) { | |||||
return 0; | |||||
} | |||||
uint64_t GetTransactionSigOpCount(const CTransaction &tx, | |||||
const CCoinsViewCache &view, uint32_t flags) { | |||||
return GetSigOpCountWithoutP2SH(tx, flags) + | |||||
GetP2SHSigOpCount(tx, view, flags); | |||||
} | |||||
namespace Consensus { | namespace Consensus { | ||||
bool CheckTxInputs(const CTransaction &tx, CValidationState &state, | bool CheckTxInputs(const CTransaction &tx, CValidationState &state, | ||||
const CCoinsViewCache &inputs, int nSpendHeight, | const CCoinsViewCache &inputs, int nSpendHeight, | ||||
Amount &txfee) { | Amount &txfee) { | ||||
// are the actual inputs available? | // are the actual inputs available? | ||||
if (!inputs.HaveInputs(tx)) { | if (!inputs.HaveInputs(tx)) { | ||||
return state.DoS(100, false, REJECT_INVALID, | return state.DoS(100, false, REJECT_INVALID, | ||||
"bad-txns-inputs-missingorspent", false, | "bad-txns-inputs-missingorspent", false, | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |