|
|
|
@ -126,7 +126,7 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in
@@ -126,7 +126,7 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in
|
|
|
|
|
unsigned int nSigOps = 0; |
|
|
|
|
for (unsigned int i = 0; i < tx.vin.size(); i++) |
|
|
|
|
{ |
|
|
|
|
const CTxOut &prevout = inputs.GetOutputFor(tx.vin[i]); |
|
|
|
|
const CTxOut &prevout = inputs.AccessCoin(tx.vin[i].prevout).out; |
|
|
|
|
if (prevout.scriptPubKey.IsPayToScriptHash()) |
|
|
|
|
nSigOps += prevout.scriptPubKey.GetSigOpCount(tx.vin[i].scriptSig); |
|
|
|
|
} |
|
|
|
@ -146,7 +146,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
@@ -146,7 +146,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
|
|
|
|
|
|
|
|
|
|
for (unsigned int i = 0; i < tx.vin.size(); i++) |
|
|
|
|
{ |
|
|
|
|
const CTxOut &prevout = inputs.GetOutputFor(tx.vin[i]); |
|
|
|
|
const CTxOut &prevout = inputs.AccessCoin(tx.vin[i].prevout).out; |
|
|
|
|
nSigOps += CountWitnessSigOps(tx.vin[i].scriptSig, prevout.scriptPubKey, &tx.vin[i].scriptWitness, flags); |
|
|
|
|
} |
|
|
|
|
return nSigOps; |
|
|
|
|