Raven Core  3.0.0
P2P Digital Currency
ismine.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 The Bitcoin Core developers
3 // Copyright (c) 2017-2019 The Raven Core developers
4 // Distributed under the MIT software license, see the accompanying
5 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 
7 #ifndef RAVEN_SCRIPT_ISMINE_H
8 #define RAVEN_SCRIPT_ISMINE_H
9 
10 #include "script/standard.h"
11 
12 #include <stdint.h>
13 
14 class CKeyStore;
15 class CScript;
16 
19 {
20  ISMINE_NO = 0,
28 };
30 typedef uint8_t isminefilter;
31 
32 /* isInvalid becomes true when the script is found invalid by consensus or policy. This will terminate the recursion
33  * and return a ISMINE_NO immediately, as an invalid script should never be considered as "mine". This is needed as
34  * different SIGVERSION may have different network rules. Currently the only use of isInvalid is indicate uncompressed
35  * keys in SIGVERSION_WITNESS_V0 script, but could also be used in similar cases in the future
36  */
37 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey, bool& isInvalid, SigVersion = SIGVERSION_BASE);
38 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey, SigVersion = SIGVERSION_BASE);
39 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest, bool& isInvalid, SigVersion = SIGVERSION_BASE);
40 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest, SigVersion = SIGVERSION_BASE);
41 
42 #endif // RAVEN_SCRIPT_ISMINE_H
boost::variant< CNoDestination, CKeyID, CScriptID > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:89
uint8_t isminefilter
used for bitflags of isminetype
Definition: ismine.h:30
Indicates that we don&#39;t know how to create a scriptSig that would solve this if we were given the app...
Definition: ismine.h:22
isminetype
IsMine() return codes.
Definition: ismine.h:18
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:396
A virtual base class for key stores.
Definition: keystore.h:19
isminetype IsMine(const CKeyStore &keystore, const CScript &scriptPubKey, bool &isInvalid, SigVersion=SIGVERSION_BASE)
Definition: ismine.cpp:50
Indicates that we know how to create a scriptSig that would solve this if we were given the appropria...
Definition: ismine.h:24
SigVersion
Definition: interpreter.h:125