Skip to content

Commit 25eb9f5

Browse files
committed
Inline CKeyStore::AddKey(const CKey &) in CBasicKeyStore
1 parent b43aba8 commit 25eb9f5

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/keystore.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
#include <util.h>
99

10-
bool CKeyStore::AddKey(const CKey &key) {
11-
return AddKeyPubKey(key, key.GetPubKey());
12-
}
13-
1410
void CBasicKeyStore::ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey)
1511
{
1612
AssertLockHeld(cs_KeyStore);

src/keystore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class CKeyStore
2525

2626
//! Add a key to the store.
2727
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) =0;
28-
virtual bool AddKey(const CKey &key);
2928

3029
//! Check whether a key corresponding to a given address is present in the store.
3130
virtual bool HaveKey(const CKeyID &address) const =0;
@@ -64,6 +63,7 @@ class CBasicKeyStore : public CKeyStore
6463

6564
public:
6665
bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override;
66+
bool AddKey(const CKey &key) { return AddKeyPubKey(key, key.GetPubKey()); }
6767
bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const override;
6868
bool HaveKey(const CKeyID &address) const override;
6969
std::set<CKeyID> GetKeys() const override;

0 commit comments

Comments
 (0)