diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2023-03-13 15:35:04 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-04-11 15:52:25 -0400 |
commit | 2f8000513675467e62bee9d0f836d2fefcc479af (patch) | |
tree | 1f22faf5b539285bdfc708db70752308fa2a6561 /src/wallet/types.h | |
parent | 8741522e6c75a0ad0c96f44e5668befc1624fb0b (diff) | |
download | bitcoin-2f8000513675467e62bee9d0f836d2fefcc479af.tar.xz |
wallet: add AddressPurpose enum to replace string values
Diffstat (limited to 'src/wallet/types.h')
-rw-r--r-- | src/wallet/types.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wallet/types.h b/src/wallet/types.h index 8c1f72f131..6198f1ae33 100644 --- a/src/wallet/types.h +++ b/src/wallet/types.h @@ -48,6 +48,20 @@ enum isminetype : unsigned int { }; /** used for bitflags of isminetype */ using isminefilter = std::underlying_type<isminetype>::type; + +/** + * Address purpose field that has been been stored with wallet sending and + * receiving addresses since BIP70 payment protocol support was added in + * https://github.com/bitcoin/bitcoin/pull/2539. This field is not currently + * used for any logic inside the wallet, but it is still shown in RPC and GUI + * interfaces and saved for new addresses. It is basically redundant with an + * address's IsMine() result. + */ +enum class AddressPurpose { + RECEIVE, + SEND, + REFUND, //!< Never set in current code may be present in older wallet databases +}; } // namespace wallet #endif // BITCOIN_WALLET_TYPES_H |