mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Use const CCoinsView's at some places.
At some places where it is possible (e. g., CheckInputs), use a const version of CCoinsView instead of a non-const one.
This commit is contained in:
@@ -644,7 +644,7 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
|
||||
// 2. P2SH scripts with a crazy number of expensive
|
||||
// CHECKSIG/CHECKMULTISIG operations
|
||||
//
|
||||
bool AreInputsStandard(const CTransaction& tx, CCoinsViewCache& mapInputs)
|
||||
bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
|
||||
{
|
||||
if (tx.IsCoinBase())
|
||||
return true; // Coinbases don't use vin normally
|
||||
@@ -717,7 +717,7 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx)
|
||||
return nSigOps;
|
||||
}
|
||||
|
||||
unsigned int GetP2SHSigOpCount(const CTransaction& tx, CCoinsViewCache& inputs)
|
||||
unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& inputs)
|
||||
{
|
||||
if (tx.IsCoinBase())
|
||||
return 0;
|
||||
@@ -1470,7 +1470,7 @@ bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned in
|
||||
return CScriptCheck(txFrom, txTo, nIn, flags, nHashType)();
|
||||
}
|
||||
|
||||
bool CheckInputs(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, std::vector<CScriptCheck> *pvChecks)
|
||||
bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, std::vector<CScriptCheck> *pvChecks)
|
||||
{
|
||||
if (!tx.IsCoinBase())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user