This commit is contained in:
jl777
2019-07-08 20:16:57 -11:00
parent 80d02fbb42
commit c9a6b6218a
3 changed files with 5 additions and 2 deletions

View File

@@ -53,6 +53,7 @@
#define NSPV_BROADCASTRESP 0x0d
int32_t NSPV_gettransaction(int32_t skipvalidation,int32_t vout,uint256 txid,int32_t height,CTransaction &tx);
extern uint256 SIG_TXHASH;
int32_t iguana_rwbuf(int32_t rwflag,uint8_t *serialized,uint16_t len,uint8_t *buf)
{

View File

@@ -135,8 +135,9 @@ bool NSPV_SignTx(CMutableTransaction &mtx,int32_t vini,int64_t utxovalue,const C
if ( ProduceSignature(TransactionSignatureCreator(&keystore,&txNewConst,vini,utxovalue,SIGHASH_ALL),scriptPubKey,sigdata,NSPV_BRANCHID) != 0 )
{
UpdateTransaction(mtx,vini,sigdata);
fprintf(stderr,"SIGTXHASH %s vini.%d %.8f\n",SIGTXHASH.GetHex().c_str(),vini,(double)utxovalue/COIN);
return(true);
} // else fprintf(stderr,"signing error for SignTx vini.%d %.8f\n",vini,(double)utxovalue/COIN);
} else fprintf(stderr,"sigerr SIGTXHASH %s vini.%d %.8f\n",SIGTXHASH.GetHex().c_str(),vini,(double)utxovalue/COIN);
return(false);
}

View File

@@ -35,6 +35,7 @@ using namespace std;
typedef vector<unsigned char> valtype;
extern uint8_t ASSETCHAINS_TXPOW;
uint256 SIG_TXHASH;
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) {}
@@ -52,7 +53,7 @@ bool TransactionSignatureCreator::CreateSig(std::vector<unsigned char>& vchSig,
} catch (logic_error ex) {
return false;
}
TXHASH = hash;
if (scriptCode.IsPayToCryptoCondition())
{
CC *cc = (CC *)extraData;