Skip to content

Commit e37ca2b

Browse files
committed
Merge #12250: Make CKey::Load references const
04ededf Make CKey::Load references const (Russell Yanofsky) Pull request description: No change in behavior, this just prevents CKey::Load arguments from looking like outputs. Tree-SHA512: 6d93bce109318e88ddd5c21ad626571344707ae0e6d46e898c76fd95a7afd1c32202a6b3dfab47d6a787c84dfcbb35343cdec898bcf8f668574aa224f2eed977
2 parents 9594139 + 04ededf commit e37ca2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/key.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig)
233233
return true;
234234
}
235235

236-
bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
236+
bool CKey::Load(const CPrivKey &privkey, const CPubKey &vchPubKey, bool fSkipCheck=false) {
237237
if (!ec_privkey_import_der(secp256k1_context_sign, (unsigned char*)begin(), privkey.data(), privkey.size()))
238238
return false;
239239
fCompressed = vchPubKey.IsCompressed();

src/key.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class CKey
135135
bool VerifyPubKey(const CPubKey& vchPubKey) const;
136136

137137
//! Load private key and check that public key matches.
138-
bool Load(CPrivKey& privkey, CPubKey& vchPubKey, bool fSkipCheck);
138+
bool Load(const CPrivKey& privkey, const CPubKey& vchPubKey, bool fSkipCheck);
139139
};
140140

141141
struct CExtKey {

0 commit comments

Comments
 (0)