Browse Source

+print

warmup
jl777 5 years ago
parent
commit
c9a6b6218a
  1. 1
      src/komodo_nSPV.h
  2. 3
      src/komodo_nSPV_wallet.h
  3. 3
      src/script/sign.cpp

1
src/komodo_nSPV.h

@ -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)
{

3
src/komodo_nSPV_wallet.h

@ -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);
}

3
src/script/sign.cpp

@ -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;

Loading…
Cancel
Save