aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-06-18 15:19:13 -0400
committerAndrew Chow <achow101-github@achow101.com>2019-07-09 16:43:10 -0400
commit172213be5b174243dc501c1103ad5fe2fee67a16 (patch)
tree2f890eb657ffa7b95ff6fb7e04b58a58c4ba081f /src/wallet/wallet.h
parent0853d8d2fd3cd19c3aea495f228222c7a8536e08 (diff)
downloadbitcoin-172213be5b174243dc501c1103ad5fe2fee67a16.tar.xz
Add GetNewDestination to CWallet to fetch new destinations
Instead of having the same multiple lines of code everywhere that new destinations are fetched, introduce GetNewDestination as a member function of CWallet which does the key fetching, label setting, script generation, and destination generation.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 87aff09039..09c2ce3796 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -815,6 +815,9 @@ private:
*/
uint256 m_last_block_processed GUARDED_BY(cs_wallet);
+ //! Fetches a key from the keypool
+ bool GetKeyFromPool(CPubKey &key, bool internal = false);
+
public:
/*
* Main wallet lock.
@@ -1110,7 +1113,6 @@ public:
bool ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool, bool fRequestedInternal);
void KeepKey(int64_t nIndex);
void ReturnKey(int64_t nIndex, bool fInternal, const CPubKey& pubkey);
- bool GetKeyFromPool(CPubKey &key, bool internal = false);
int64_t GetOldestKeyPoolTime();
/**
* Marks all keys in the keypool up to and including reserve_key as used.
@@ -1123,6 +1125,8 @@ public:
std::set<CTxDestination> GetLabelAddresses(const std::string& label) const;
+ bool GetNewDestination(const OutputType type, const std::string label, CTxDestination& dest, std::string& error);
+
isminetype IsMine(const CTxIn& txin) const;
/**
* Returns amount of debit if the input matches the