make sure IsMine only returns true when we own all keys

This commit is contained in:
coderrr
2012-01-03 06:24:52 +07:00
parent 625b56de64
commit 6ec76ca09e
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1436,7 +1436,7 @@ bool IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
// them) enable spend-out-from-under-you attacks, especially
// in shared-wallet situations.
vector<valtype> keys(vSolutions.begin()+1, vSolutions.begin()+vSolutions.size()-1);
return HaveKeys(vSolutions, keystore);
return HaveKeys(keys, keystore) == keys.size();
}
}
return false;