aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/ismine.h
diff options
context:
space:
mode:
authorHAOYUatHZ <haoyu@protonmail.com>2019-11-02 10:56:30 +0800
committerHAOYUatHZ <haoyu@protonmail.com>2021-01-19 19:04:45 +0800
commit40f05647ee298f8419df795942248d9ded3beb43 (patch)
tree63c4e0a60edaf24696c7b485415b70c76e4fe064 /src/wallet/ismine.h
parent26d7941224bcfe4f6ce9d4462610f300c9bd029a (diff)
downloadbitcoin-40f05647ee298f8419df795942248d9ded3beb43.tar.xz
doc: Add developer documentation to isminetype
Diffstat (limited to 'src/wallet/ismine.h')
-rw-r--r--src/wallet/ismine.h22
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,