aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/wallet.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2018-04-10 11:50:10 -0400
committerJames O'Beirne <james.obeirne@gmail.com>2018-04-25 13:08:53 -0400
commitc5b277033a72650c221084ec0f1326623a810fd0 (patch)
tree4ea793666e91c081e738dcab2cdfe2078c2e60c3 /src/interfaces/wallet.cpp
parenta785bc3667d3c11a014da77436a23b1b865458a4 (diff)
Add purpose arg to Wallet::getAddress
Also make all arguments to getAddress required and document args at call sites.
Diffstat (limited to 'src/interfaces/wallet.cpp')
-rw-r--r--src/interfaces/wallet.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index f4dfdae8ae..63b9d80a92 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -152,7 +152,10 @@ public:
{
return m_wallet.DelAddressBook(dest);
}
- bool getAddress(const CTxDestination& dest, std::string* name, isminetype* is_mine) override
+ bool getAddress(const CTxDestination& dest,
+ std::string* name,
+ isminetype* is_mine,
+ std::string* purpose) override
{
LOCK(m_wallet.cs_wallet);
auto it = m_wallet.mapAddressBook.find(dest);
@@ -165,6 +168,9 @@ public:
if (is_mine) {
*is_mine = IsMine(m_wallet, dest);
}
+ if (purpose) {
+ *purpose = it->second.purpose;
+ }
return true;
}
std::vector<WalletAddress> getAddresses() override