Update signing to deal with NULL keystore

This commit is contained in:
miketout
2018-10-13 21:42:30 -07:00
parent 6c621e0e43
commit 11f4f605e2
2 changed files with 3 additions and 2 deletions

View File

@@ -245,7 +245,7 @@ static bool SignStepCC(const BaseSignatureCreator& creator, const CScript& scrip
// first of priv key in our key store or contract address is what we sign with
for (auto pk : p.vKeys)
{
if (creator.KeyStore().GetKey(pk.GetID(), privKey) && privKey.IsValid())
if (creator.IsKeystoreValid() && creator.KeyStore().GetKey(pk.GetID(), privKey) && privKey.IsValid())
break;
if (pk == CPubKey(ParseHex(C.CChexstr)))