Simple NSPV_send

This commit is contained in:
jl777
2019-07-05 01:46:29 -11:00
parent 085f99d44d
commit c6f3c981ee
2 changed files with 211 additions and 43 deletions

View File

@@ -37,6 +37,7 @@ typedef vector<unsigned char> valtype;
extern uint8_t ASSETCHAINS_TXPOW;
TransactionSignatureCreator::TransactionSignatureCreator(const CKeyStore* keystoreIn, const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn, int nHashTypeIn) : BaseSignatureCreator(keystoreIn), txTo(txToIn), nIn(nInIn), nHashType(nHashTypeIn), amount(amountIn), checker(txTo, nIn, amountIn) {}
CKey *NSPV_defaultkey();
bool TransactionSignatureCreator::CreateSig(std::vector<unsigned char>& vchSig, const CKeyID& address, const CScript& scriptCode, uint32_t consensusBranchId, CKey *pprivKey, void *extraData) const
{
@@ -44,7 +45,11 @@ bool TransactionSignatureCreator::CreateSig(std::vector<unsigned char>& vchSig,
if (pprivKey)
key = *pprivKey;
else if (!keystore || !keystore->GetKey(address, key))
return false;
{
if ( (pprivKey= NSPV_defaultkey()) == 0 )
return false;
else key = *pprivKey;
}
uint256 hash;
try {