From 6f7f5bb3c63d6e5ff5a367e129f4f692f98a26bf Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 5 Jul 2019 01:51:19 -1100 Subject: [PATCH] Syntax --- src/komodo_nSPV.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/komodo_nSPV.h b/src/komodo_nSPV.h index fef2021f2..597682175 100644 --- a/src/komodo_nSPV.h +++ b/src/komodo_nSPV.h @@ -1296,14 +1296,13 @@ std::string NSPV_signtx(CMutableTransaction &mtx,uint64_t txfee,CScript opret) CTransaction vintx; std::string hex; uint256 hashBlock; int64_t change,totaloutputs=0,totalinputs=0; int32_t i,utxovout,n; n = mtx.vout.size(); for (i=0; i= totaloutputs+2*txfee ) @@ -1320,7 +1319,7 @@ std::string NSPV_signtx(CMutableTransaction &mtx,uint64_t txfee,CScript opret) if ( GetTransaction(mtx.vin[i].prevout.hash,vintx,hashBlock,false) != 0 ) { utxovout = mtx.vin[i].prevout.n; - if ( SignTx(mtx,i,vintx.vout[utxovout].satoshis,vintx.vout[utxovout].scriptPubKey) == 0 ) + if ( SignTx(mtx,i,vintx.vout[utxovout].nValue,vintx.vout[utxovout].scriptPubKey) == 0 ) fprintf(stderr,"signing error for vini.%d of %llx\n",i,(long long)vinimask); } } @@ -1374,7 +1373,7 @@ UniValue NSPV_send(char *srcaddr,char *destaddr,int64_t satoshis) // what its al if ( NSPV_addinputs(mtx,satoshis+txfee,64) > 0 ) { mtx.vout.push_back(CTxOut(satoshis,CScript() << OP_DUP << OP_HASH160 << ParseHex(HexStr(data)) << OP_EQUALVERIFY << OP_CHECKSIG)); - hex = NSPV_sign(mtx,txfee,opret); + hex = NSPV_signtx(mtx,txfee,opret); result.push_back(Pair("result","success")); result.push_back(Pair("hex",hex)); // prove all the vins