Don't calculate sigops for coinbase scriptsig.
authorCryptoManiac <balthazar@yandex.ru>
Sun, 13 Sep 2015 14:33:51 +0000 (17:33 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Sun, 13 Sep 2015 14:33:51 +0000 (17:33 +0300)
Novacoin/CTransaction.cs

index c5c2b90..3434842 100644 (file)
@@ -179,10 +179,17 @@ namespace Novacoin
             get
             {
                 uint nSigOps = 0;
-                foreach (var txin in vin)
+
+                if (!IsCoinBase)
                 {
-                    nSigOps += txin.scriptSig.GetSigOpCount(false);
+                    // http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2012-July/001718.html
+
+                    foreach (var txin in vin)
+                    {
+                        nSigOps += txin.scriptSig.GetSigOpCount(false);
+                    }
                 }
+
                 foreach (var txout in vout)
                 {
                     nSigOps += txout.scriptPubKey.GetSigOpCount(false);