Merge #17350: doc: Add developer documentation to isminetype

40f05647ee298f8419df795942248d9ded3beb43 doc: Add developer documentation to isminetype (HAOYUatHZ)

Pull request description:

  Closes: https://github.com/bitcoin/bitcoin/issues/17217

ACKs for top commit:
  meshcollider:
    utACK 40f05647ee298f8419df795942248d9ded3beb43

Tree-SHA512: 156ff3bc02613d65aed5fcf50250ec3f3365b6c83c810763673ecfdd081a1310e5235be05f0c782638f191be61ad0028511392c40e4106a56eb1c6a3a8ab73b9
This commit is contained in:
Samuel Dobson 2021-01-26 13:15:56 +13:00 committed by PastaPastaPasta
parent 61cb16ba2c
commit 535d7cd5b0

View File

@ -14,7 +14,27 @@
class CWallet; class CWallet;
class CScript; class CScript;
/** IsMine() return codes */ /**
* IsMine() return codes, which depend on ScriptPubKeyMan implementation.
* Not every ScriptPubKeyMan covers all types, please refer to
* https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.21.0.md#ismine-semantics
* for better understanding.
*
* For LegacyScriptPubKeyMan,
* ISMINE_NO: the scriptPubKey is not in the wallet;
* ISMINE_WATCH_ONLY: the scriptPubKey has been imported into the wallet;
* ISMINE_SPENDABLE: the scriptPubKey corresponds to an address owned by the wallet user (can spend with the private key);
* ISMINE_USED: the scriptPubKey corresponds to a used address owned by the wallet user;
* ISMINE_ALL: all ISMINE flags except for USED;
* ISMINE_ALL_USED: all ISMINE flags including USED;
* ISMINE_ENUM_ELEMENTS: the number of isminetype enum elements.
*
* For DescriptorScriptPubKeyMan and future ScriptPubKeyMan,
* ISMINE_NO: the scriptPubKey is not in the wallet;
* ISMINE_SPENDABLE: the scriptPubKey matches a scriptPubKey in the wallet.
* ISMINE_USED: the scriptPubKey corresponds to a used address owned by the wallet user.
*
*/
enum isminetype : unsigned int enum isminetype : unsigned int
{ {
ISMINE_NO = 0, ISMINE_NO = 0,