Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 1,182 Lines • ▼ Show 20 Lines | void UpdateCoins(CCoinsViewCache &view, const CTransaction &tx, int nHeight) { | ||||
AddCoins(view, tx, nHeight); | AddCoins(view, tx, nHeight); | ||||
} | } | ||||
bool CScriptCheck::operator()() { | bool CScriptCheck::operator()() { | ||||
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; | const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; | ||||
return VerifyScript(scriptSig, scriptPubKey, nFlags, | return VerifyScript(scriptSig, scriptPubKey, nFlags, | ||||
CachingTransactionSignatureChecker(ptxTo, nIn, amount, | CachingTransactionSignatureChecker(ptxTo, nIn, amount, | ||||
cacheStore, txdata), | cacheStore, txdata), | ||||
metrics, &error); | &error); | ||||
deadalnix: I don't see how you can get away with passing a metric object down here. You will have to… | |||||
markblundebergAuthorUnsubmitted Done Inline Actionsargh, somehow I am randomly missing these comments and only seeing them later. Yeah we can keep it this way for now. What I really want is to make CScriptCheck not store the value of error / metrics, and instead have a second bool operator()(&errorOut, &metricsOut). The plain version would just not output these. Then CScriptCheck would just store the input parameters of the closure, and not the outputs. Anyway, can be done later. markblundeberg: argh, somehow I am randomly missing these comments and only seeing them later.
Yeah we can… | |||||
} | } | ||||
int GetSpendHeight(const CCoinsViewCache &inputs) { | int GetSpendHeight(const CCoinsViewCache &inputs) { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
CBlockIndex *pindexPrev = LookupBlockIndex(inputs.GetBestBlock()); | CBlockIndex *pindexPrev = LookupBlockIndex(inputs.GetBestBlock()); | ||||
return pindexPrev->nHeight + 1; | return pindexPrev->nHeight + 1; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 4,502 Lines • Show Last 20 Lines |
I don't see how you can get away with passing a metric object down here. You will have to extract that number.