diff options
author | Samuel Dobson <dobsonsa68@gmail.com> | 2021-01-26 13:15:56 +1300 |
---|---|---|
committer | Samuel Dobson <dobsonsa68@gmail.com> | 2021-01-26 13:24:35 +1300 |
commit | 16ae3368f2a20cffa312b6ee9b724c1e302ca5fb (patch) | |
tree | 5a6eafac70af744930580fca9c71874b590f69da /src/wallet | |
parent | 4b15ffe9913e5f1e4d7a7922ddd7ef83e5b091d3 (diff) | |
parent | 40f05647ee298f8419df795942248d9ded3beb43 (diff) |
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
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/ismine.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/wallet/ismine.h b/src/wallet/ismine.h index 5cdd7dff80..38ed7e7770 100644 --- a/src/wallet/ismine.h +++ b/src/wallet/ismine.h @@ -14,7 +14,27 @@ class CWallet; 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 { ISMINE_NO = 0, |