CTransaction::GetLegacySigOpCount() const
{
unsigned int nSigOps = 0;
- BOOST_FOREACH(const CTxIn& txin, vin)
+ if (!IsCoinBase() || nTime < COINBASE_SIGOPS_SWITCH_TIME)
{
- nSigOps += txin.scriptSig.GetSigOpCount(false);
+ // Coinbase scriptsigs are never executed, so there is
+ // no sense in calculation of sigops.
+ BOOST_FOREACH(const CTxIn& txin, vin)
+ {
+ nSigOps += txin.scriptSig.GetSigOpCount(false);
+ }
}
BOOST_FOREACH(const CTxOut& txout, vout)
{
#ifndef BITCOIN_TIMESTAMPS_H
#define BITCOIN_TIMESTAMPS_H
-static const unsigned int TARGETS_SWITCH_TIME = 1374278400; // Sat, 20 Jul 2013 00:00:00 GMT
-static const unsigned int CHAINCHECKS_SWITCH_TIME = 1379635200; // Fri, 20 Sep 2013 00:00:00 GMT
+static const unsigned int TARGETS_SWITCH_TIME = 1374278400; // Saturday, 20-Jul-2013 00:00:00 UTC
+static const unsigned int CHAINCHECKS_SWITCH_TIME = 1379635200; // Friday, 20-Sep-2013 00:00:00 UTC
+static const unsigned int COINBASE_SIGOPS_SWITCH_TIME = 1447977600; // Friday, 20-Nov-15 00:00:00 UTC
#endif