Reorder code

This commit is contained in:
jl777
2019-07-08 20:52:35 -11:00
parent 492dc5c2cc
commit 34878d8dbc

View File

@@ -41,21 +41,18 @@ TransactionSignatureCreator::TransactionSignatureCreator(const CKeyStore* keysto
bool TransactionSignatureCreator::CreateSig(std::vector<unsigned char>& vchSig, const CKeyID& address, const CScript& scriptCode, uint32_t consensusBranchId, CKey *pprivKey, void *extraData) const
{
CKey key;
fprintf(stderr,"createsig\n");
if (pprivKey)
key = *pprivKey;
else if (!keystore || !keystore->GetKey(address, key))
return false;
fprintf(stderr,"createsig2\n");
uint256 hash;
CKey key; uint256 hash;
try {
hash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, consensusBranchId);
} catch (logic_error ex) {
return false;
}
SIG_TXHASH = hash;
if (pprivKey)
key = *pprivKey;
else if (!keystore || !keystore->GetKey(address, key))
return false;
if (scriptCode.IsPayToCryptoCondition())
{
CC *cc = (CC *)extraData;