diff --git a/src/key.cpp b/src/key.cpp index f8136f88b..e998e3db6 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -233,7 +233,7 @@ bool CKey::SignCompact(const uint256 &hash, std::vector& vchSig) return true; } -bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) { +bool CKey::Load(const CPrivKey &privkey, const CPubKey &vchPubKey, bool fSkipCheck=false) { if (!ec_privkey_import_der(secp256k1_context_sign, (unsigned char*)begin(), privkey.data(), privkey.size())) return false; fCompressed = vchPubKey.IsCompressed(); diff --git a/src/key.h b/src/key.h index 2a6e20ef6..3c0a7574f 100644 --- a/src/key.h +++ b/src/key.h @@ -135,7 +135,7 @@ public: bool VerifyPubKey(const CPubKey& vchPubKey) const; //! Load private key and check that public key matches. - bool Load(CPrivKey& privkey, CPubKey& vchPubKey, bool fSkipCheck); + bool Load(const CPrivKey& privkey, const CPubKey& vchPubKey, bool fSkipCheck); }; struct CExtKey {