diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-24 16:26:54 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-24 16:33:33 +0100 |
commit | e37ca2be91bd828e1c39e0768420adc58a521b95 (patch) | |
tree | 44b8d90589571d0e87bc4beb3359e22d8499f23c /src | |
parent | 95941396fff81f60d75fc8cca70716b26efe820e (diff) | |
parent | 04ededf0015a05b90ce150dd0c7dddb4c028b08b (diff) | |
download | bitcoin-e37ca2be91bd828e1c39e0768420adc58a521b95.tar.xz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/key.cpp | 2 | ||||
-rw-r--r-- | src/key.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/key.cpp b/src/key.cpp index f8136f88b5..e998e3db6e 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -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(); @@ -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 { |