diff options
| author | Pieter Wuille <[email protected]> | 2016-10-17 00:32:36 +0800 |
|---|---|---|
| committer | Johnson Lau <[email protected]> | 2016-10-17 00:34:37 +0800 |
| commit | 248f3a76a825a332e5495c5947ad283a9e5e938f (patch) | |
| tree | 558883d85e04a20c45d9292659dd60c7b178599b /src/script/ismine.h | |
| parent | [qa] Add tests for uncompressed pubkeys in segwit (diff) | |
| download | discoin-248f3a76a825a332e5495c5947ad283a9e5e938f.tar.xz discoin-248f3a76a825a332e5495c5947ad283a9e5e938f.zip | |
Fix ismine and addwitnessaddress: no uncompressed keys in segwit
Diffstat (limited to 'src/script/ismine.h')
| -rw-r--r-- | src/script/ismine.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/script/ismine.h b/src/script/ismine.h index 4b7db8802..ec7a620e3 100644 --- a/src/script/ismine.h +++ b/src/script/ismine.h @@ -28,7 +28,14 @@ enum isminetype /** used for bitflags of isminetype */ typedef uint8_t isminefilter; -isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey); -isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest); +/* isInvalid becomes true when the script is found invalid by consensus or policy. This will terminate the recursion + * and return a ISMINE_NO immediately, as an invalid script should never be considered as "mine". This is needed as + * different SIGVERSION may have different network rules. Currently the only use of isInvalid is indicate uncompressed + * keys in SIGVERSION_WITNESS_V0 script, but could also be used in similar cases in the future + */ +isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey, bool& isInvalid, SigVersion = SIGVERSION_BASE); +isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey, SigVersion = SIGVERSION_BASE); +isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest, bool& isInvalid, SigVersion = SIGVERSION_BASE); +isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest, SigVersion = SIGVERSION_BASE); #endif // BITCOIN_SCRIPT_ISMINE_H |