Skip to content

Commit 16ae336

Browse files
committed
Merge #17350: doc: Add developer documentation to isminetype
40f0564 doc: Add developer documentation to isminetype (HAOYUatHZ) Pull request description: Closes: bitcoin/bitcoin#17217 ACKs for top commit: meshcollider: utACK 40f0564 Tree-SHA512: 156ff3bc02613d65aed5fcf50250ec3f3365b6c83c810763673ecfdd081a1310e5235be05f0c782638f191be61ad0028511392c40e4106a56eb1c6a3a8ab73b9
2 parents 4b15ffe + 40f0564 commit 16ae336

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/wallet/ismine.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,27 @@
1414
class CWallet;
1515
class CScript;
1616

17-
/** IsMine() return codes */
17+
/**
18+
* IsMine() return codes, which depend on ScriptPubKeyMan implementation.
19+
* Not every ScriptPubKeyMan covers all types, please refer to
20+
* https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.21.0.md#ismine-semantics
21+
* for better understanding.
22+
*
23+
* For LegacyScriptPubKeyMan,
24+
* ISMINE_NO: the scriptPubKey is not in the wallet;
25+
* ISMINE_WATCH_ONLY: the scriptPubKey has been imported into the wallet;
26+
* ISMINE_SPENDABLE: the scriptPubKey corresponds to an address owned by the wallet user (can spend with the private key);
27+
* ISMINE_USED: the scriptPubKey corresponds to a used address owned by the wallet user;
28+
* ISMINE_ALL: all ISMINE flags except for USED;
29+
* ISMINE_ALL_USED: all ISMINE flags including USED;
30+
* ISMINE_ENUM_ELEMENTS: the number of isminetype enum elements.
31+
*
32+
* For DescriptorScriptPubKeyMan and future ScriptPubKeyMan,
33+
* ISMINE_NO: the scriptPubKey is not in the wallet;
34+
* ISMINE_SPENDABLE: the scriptPubKey matches a scriptPubKey in the wallet.
35+
* ISMINE_USED: the scriptPubKey corresponds to a used address owned by the wallet user.
36+
*
37+
*/
1838
enum isminetype : unsigned int
1939
{
2040
ISMINE_NO = 0,

0 commit comments

Comments
 (0)