From 65b6bdc2b164343ec3cc3d32a0297daff9e24fec Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 22 Feb 2020 02:04:27 +0000 Subject: Wallet: Add CAddressBookData::IsChange which returns true iff label has never been set --- src/wallet/wallet.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/wallet') diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 47268ba88c..788f29c039 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -182,6 +182,7 @@ public: class CAddressBookData { private: + bool m_change{true}; std::string m_label; public: const std::string& name; @@ -192,7 +193,9 @@ public: typedef std::map StringMap; StringMap destdata; + bool IsChange() const { return m_change; } void SetLabel(const std::string& label) { + m_change = false; m_label = label; } }; -- cgit v1.2.3