Replace INT_MAX with INT32_MAX to avoid compile err
[novacoin.git] / src / test / sigopcount_tests.cpp
index 0b0a4a6..59673f9 100644 (file)
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21);
 
     CScript p2sh;
-    p2sh.SetPayToScriptHash(s1);
+    p2sh.SetDestination(s1.GetID());
     CScript scriptSig;
     scriptSig << OP_0 << Serialize(s1);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3);
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     for (int i = 0; i < 3; i++)
     {
         CKey k;
-        k.MakeNewKey();
+        k.MakeNewKey(true);
         keys.push_back(k);
     }
     CScript s2;
@@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3);
     BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20);
 
-    p2sh.SetPayToScriptHash(s2);
+    p2sh.SetDestination(s2.GetID());
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0);
     CScript scriptSig2;