Update CScriptID class
[novacoin.git] / src / key.h
index 2489dfc..5c42c41 100644 (file)
--- a/src/key.h
+++ b/src/key.h
@@ -59,6 +59,7 @@ class CScriptID : public uint160
 {
 public:
     CScriptID() : uint160(0) { }
+    CScriptID(const CScript& in);
     CScriptID(const uint160 &in) : uint160(in) { }
 };
 
@@ -200,9 +201,9 @@ public:
     }
 
     bool Verify(const uint256& hash, const std::vector<unsigned char>& vchSig) const;
-    bool VerifyCompact(uint256 hash, const std::vector<unsigned char>& vchSig);
+    bool VerifyCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig);
 
-    bool SetCompactSignature(uint256 hash, const std::vector<unsigned char>& vchSig);
+    bool SetCompactSignature(const uint256 &hash, const std::vector<unsigned char>& vchSig);
 
     // Reserialize to DER
     static bool ReserealizeSignature(std::vector<unsigned char>& vchSig);
@@ -223,7 +224,6 @@ class CKey
 protected:
     EC_KEY* pkey;
     bool fSet;
-    bool fCompressedPubKey;
 
 public:
 
@@ -240,7 +240,7 @@ public:
     bool IsNull() const;
     bool IsCompressed() const;
 
-    void SetCompressedPubKey();
+    void SetCompressedPubKey(bool fCompressed=true);
     void MakeNewKey(bool fCompressed=true);
     bool SetPrivKey(const CPrivKey& vchPrivKey);
     bool SetSecret(const CSecret& vchSecret, bool fCompressed = true);
@@ -256,7 +256,7 @@ public:
     // The format is one header byte, followed by two times 32 bytes for the serialized r and s values.
     // The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,
     //                  0x1D = second key with even y, 0x1E = second key with odd y
-    bool SignCompact(uint256 hash, std::vector<unsigned char>& vchSig);
+    bool SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig);
 
     bool IsValid();
 
@@ -401,7 +401,7 @@ private:
     CPubKey vchPubKeyH;
 
 public:
-    CMalleableKeyView() { };
+    CMalleableKeyView() { }
     CMalleableKeyView(const CMalleableKey &b);
     CMalleableKeyView(const std::string &strMalleableKey);