| 120 | } |
| 121 | |
| 122 | unsigned int GetLegacySigOpCount(const CTransaction& tx) |
| 123 | { |
| 124 | unsigned int nSigOps = 0; |
| 125 | for (const auto& txin : tx.vin) |
| 126 | { |
| 127 | nSigOps += txin.scriptSig.GetSigOpCount(false); |
| 128 | } |
| 129 | for (const auto& txout : tx.vout) |
| 130 | { |
| 131 | nSigOps += txout.scriptPubKey.GetSigOpCount(false); |
| 132 | } |
| 133 | return nSigOps; |
| 134 | } |
| 135 | |
| 136 | unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& inputs) |
| 137 | { |