Reorder code
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user