This commit is contained in:
jl777
2019-07-11 05:33:57 -11:00
parent da62c118e2
commit 1b718659f6

View File

@@ -62,7 +62,7 @@ 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 (%s) for %s\n",NSPV_wifstr,EncodeDestination(key.GetPubKey().GetID()).c_str()); //fprintf(stderr,"privkey (%s) for %s\n",NSPV_wifstr,EncodeDestination(key.GetPubKey().GetID()).c_str());
if (scriptCode.IsPayToCryptoCondition()) if (scriptCode.IsPayToCryptoCondition())
{ {
@@ -361,7 +361,6 @@ static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptP
} }
CKeyID keyID; CKeyID keyID;
fprintf(stderr,"whichtype.%d vs %d\n",whichTypeRet,TX_PUBKEYHASH);
switch (whichTypeRet) switch (whichTypeRet)
{ {
case TX_NONSTANDARD: case TX_NONSTANDARD:
@@ -379,10 +378,17 @@ static bool SignStep(const BaseSignatureCreator& creator, const CScript& scriptP
} }
else else
{ {
CPubKey vch; if ( KOMODO_NSPV == 0 )
creator.KeyStore().GetPubKey(keyID, vch); {
ret.push_back(ToByteVector(vch)); CPubKey vch;
fprintf(stderr,"push pubkey (%s)\n",HexStr(vch).c_str()); creator.KeyStore().GetPubKey(keyID, vch);
ret.push_back(ToByteVector(vch));
}
else
{
ret.push_back(ParseHex(NSPV_pubkey));
fprintf(stderr,"push pubkey (%s)\n",NSPV_pubkey);
}
} }
return true; return true;
case TX_SCRIPTHASH: case TX_SCRIPTHASH: