Skip to content

Commit 65b6bdc

Browse files
committed
Wallet: Add CAddressBookData::IsChange which returns true iff label has never been set
1 parent 144b2f8 commit 65b6bdc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/wallet/wallet.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ class ReserveDestination
182182
class CAddressBookData
183183
{
184184
private:
185+
bool m_change{true};
185186
std::string m_label;
186187
public:
187188
const std::string& name;
@@ -192,7 +193,9 @@ class CAddressBookData
192193
typedef std::map<std::string, std::string> StringMap;
193194
StringMap destdata;
194195

196+
bool IsChange() const { return m_change; }
195197
void SetLabel(const std::string& label) {
198+
m_change = false;
196199
m_label = label;
197200
}
198201
};

0 commit comments

Comments
 (0)