From e83babe3b85b22e2360a99f9827b2b0d107ad0fa Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 20 Feb 2023 17:45:32 -0500 Subject: wallet: Replace use of purpose strings with an enum Instead of storing and passing around fixed strings for the purpose of an address, use an enum. This also rationalizes the CAddressBookData struct, documenting all fields and making them public, and simplifying the representation to avoid bugs like https://github.com/bitcoin/bitcoin/pull/26761#discussion_r1134615114 and make it not possible to invalid address data like change addresses with labels. Co-authored-by: Ryan Ofsky --- src/qt/walletmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qt/walletmodel.h') diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 17a39349f3..4f75d41404 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -236,7 +236,7 @@ public Q_SLOTS: /* New transaction, or transaction changed status */ void updateTransaction(); /* New, updated or removed address book entry */ - void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status); + void updateAddressBook(const QString &address, const QString &label, bool isMine, wallet::AddressPurpose purpose, int status); /* Watch-only added */ void updateWatchOnlyFlag(bool fHaveWatchonly); /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */ -- cgit v1.2.3