Skip to content

Commit 2f80005

Browse files
ryanofskyachow101
authored andcommitted
wallet: add AddressPurpose enum to replace string values
1 parent 8741522 commit 2f80005

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/wallet/types.h

+14
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ enum isminetype : unsigned int {
4848
};
4949
/** used for bitflags of isminetype */
5050
using isminefilter = std::underlying_type<isminetype>::type;
51+
52+
/**
53+
* Address purpose field that has been been stored with wallet sending and
54+
* receiving addresses since BIP70 payment protocol support was added in
55+
* https://github.com/bitcoin/bitcoin/pull/2539. This field is not currently
56+
* used for any logic inside the wallet, but it is still shown in RPC and GUI
57+
* interfaces and saved for new addresses. It is basically redundant with an
58+
* address's IsMine() result.
59+
*/
60+
enum class AddressPurpose {
61+
RECEIVE,
62+
SEND,
63+
REFUND, //!< Never set in current code may be present in older wallet databases
64+
};
5165
} // namespace wallet
5266

5367
#endif // BITCOIN_WALLET_TYPES_H

0 commit comments

Comments
 (0)