mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02: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:
parent
a3dc587a62
commit
d0867acb0e
4 changed files with 9 additions and 9 deletions
|
|
@ -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())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue