This commit is contained in:
@@ -62,6 +62,8 @@ bool TransactionSignatureCreator::CreateSig(std::vector<unsigned char>& vchSig,
|
|||||||
fprintf(stderr,"keystore.%p error\n",keystore);
|
fprintf(stderr,"keystore.%p error\n",keystore);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
fprintf(stderr,"privkey for %s\n",EncodeDestination(NSPV_key.GetPubKey().GetID()).c_str());
|
||||||
|
|
||||||
if (scriptCode.IsPayToCryptoCondition())
|
if (scriptCode.IsPayToCryptoCondition())
|
||||||
{
|
{
|
||||||
CC *cc = (CC *)extraData;
|
CC *cc = (CC *)extraData;
|
||||||
@@ -330,8 +332,6 @@ static bool SignStepCC(const BaseSignatureCreator& creator, const CScript& scrip
|
|||||||
* unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script.
|
* unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script.
|
||||||
* Returns false if scriptPubKey could not be completely satisfied.
|
* Returns false if scriptPubKey could not be completely satisfied.
|
||||||
*/
|
*/
|
||||||
extern char NSPV_pubkeystr[];
|
|
||||||
|
|
||||||
static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptPubKey,
|
static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptPubKey,
|
||||||
std::vector<valtype>& ret, txnouttype& whichTypeRet, uint32_t consensusBranchId)
|
std::vector<valtype>& ret, txnouttype& whichTypeRet, uint32_t consensusBranchId)
|
||||||
{
|
{
|
||||||
@@ -379,17 +379,10 @@ static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptP
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( KOMODO_NSPV != 0 )
|
CPubKey vch;
|
||||||
{
|
creator.KeyStore().GetPubKey(keyID, vch);
|
||||||
fprintf(stderr,"push pubkey %s\n",NSPV_pubkeystr);
|
ret.push_back(ToByteVector(vch));
|
||||||
ret.push_back(ParseHex(NSPV_pubkeystr));
|
fprintf(stderr,"push pubkey (%s)\n",HexStr(vch).c_str());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CPubKey vch;
|
|
||||||
creator.KeyStore().GetPubKey(keyID, vch);
|
|
||||||
ret.push_back(ToByteVector(vch));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case TX_SCRIPTHASH:
|
case TX_SCRIPTHASH:
|
||||||
@@ -447,8 +440,6 @@ bool ProduceSignature(const BaseSignatureCreator& creator, const CScript& fromPu
|
|||||||
|
|
||||||
sigdata.scriptSig = PushAll(result);
|
sigdata.scriptSig = PushAll(result);
|
||||||
// Test solution
|
// Test solution
|
||||||
if ( KOMODO_NSPV != 0 )
|
|
||||||
return(solved);
|
|
||||||
return solved && VerifyScript(sigdata.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, creator.Checker(), consensusBranchId);
|
return solved && VerifyScript(sigdata.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, creator.Checker(), consensusBranchId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user