Skip to content

Commit 428a898

Browse files
committed
SQUASH "Add have-pubkey distinction to ISMINE flags"
1 parent 6bdb474 commit 428a898

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/wallet/wallet_ismine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
4141
txnouttype whichType;
4242
if (!Solver(scriptPubKey, whichType, vSolutions)) {
4343
if (keystore.HaveWatchOnly(scriptPubKey))
44-
return ISMINE_WATCH_NOPUBKEY;
44+
return ISMINE_WATCH_UNSOLVABLE;
4545
return ISMINE_NO;
4646
}
4747

@@ -89,7 +89,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
8989
if (keystore.HaveWatchOnly(scriptPubKey)) {
9090
// TODO: This could be optimized some by doing some work after the above solver
9191
CScript scriptSig;
92-
return ProduceSignature(DummySignatureCreator(&keystore), scriptPubKey, scriptSig) ? ISMINE_WATCH_PUBKEY : ISMINE_WATCH_NOPUBKEY;
92+
return ProduceSignature(DummySignatureCreator(&keystore), scriptPubKey, scriptSig) ? ISMINE_WATCH_SOLVABLE : ISMINE_WATCH_UNSOLVABLE;
9393
}
9494
return ISMINE_NO;
9595
}

src/wallet/wallet_ismine.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ enum isminetype
1717
{
1818
ISMINE_NO = 0,
1919
//! Indicates that we dont know how to create a scriptSig that would solve this if we were given the appropriate private keys
20-
ISMINE_WATCH_NOPUBKEY = 1,
20+
ISMINE_WATCH_UNSOLVABLE = 1,
2121
//! Indicates that we know how to create a scriptSig that would solve this if we were given the appropriate private keys
22-
ISMINE_WATCH_PUBKEY = 2,
23-
ISMINE_WATCH_ONLY = ISMINE_WATCH_NOPUBKEY | ISMINE_WATCH_PUBKEY,
22+
ISMINE_WATCH_SOLVABLE = 2,
23+
ISMINE_WATCH_ONLY = ISMINE_WATCH_SOLVABLE | ISMINE_WATCH_UNSOLVABLE,
2424
ISMINE_SPENDABLE = 4,
2525
ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE
2626
};

0 commit comments

Comments
 (0)