Skip to content

Commit

Permalink
Make CKey::Load references const
Browse files Browse the repository at this point in the history
No change in behavior, this just prevents CKey::Load arguments from looking
like outputs.
  • Loading branch information
ryanofsky committed Jan 23, 2018
1 parent b5e4b9b commit 04ededf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/key.cpp
Expand Up @@ -233,7 +233,7 @@ bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& 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();
Expand Down
2 changes: 1 addition & 1 deletion src/key.h
Expand Up @@ -135,7 +135,7 @@ class CKey
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 {
Expand Down

0 comments on commit 04ededf

Please sign in to comment.