nSPV modifications for CC and other fixes (#29)
This commit is contained in:
committed by
GitHub
parent
13b1075e3a
commit
bc665882ed
@@ -305,7 +305,7 @@ int32_t NSPV_rwtxproof(int32_t rwflag,uint8_t *serialized,struct NSPV_txproof *p
|
||||
len += iguana_rwnum(rwflag,&serialized[len],sizeof(ptr->vout),&ptr->vout);
|
||||
len += iguana_rwuint8vec(rwflag,&serialized[len],&ptr->txlen,&ptr->tx);
|
||||
len += iguana_rwuint8vec(rwflag,&serialized[len],&ptr->txprooflen,&ptr->txproof);
|
||||
fprintf(stderr,"len %d\n",len);
|
||||
len += iguana_rwbignum(rwflag,&serialized[len],sizeof(ptr->hashblock),(uint8_t *)&ptr->hashblock);
|
||||
return(len);
|
||||
}
|
||||
|
||||
@@ -517,11 +517,11 @@ int32_t NSPV_fastnotariescount(CTransaction tx,uint8_t elected[64][33],uint32_t
|
||||
*/
|
||||
int32_t NSPV_notariescount(CTransaction tx,uint8_t elected[64][33])
|
||||
{
|
||||
uint8_t *script; CTransaction vintx; int64_t rewardsum = 0; int32_t i,j,utxovout,scriptlen,numsigs = 0;
|
||||
uint8_t *script; CTransaction vintx; int64_t rewardsum = 0; int32_t i,j,utxovout,scriptlen,numsigs = 0,txheight,currentheight; uint256 hashBlock;
|
||||
for (i=0; i<tx.vin.size(); i++)
|
||||
{
|
||||
utxovout = tx.vin[i].prevout.n;
|
||||
if ( NSPV_gettransaction(1,utxovout,tx.vin[i].prevout.hash,0,vintx,-1,0,rewardsum) != 0 )
|
||||
if ( NSPV_gettransaction(1,utxovout,tx.vin[i].prevout.hash,0,vintx,hashBlock,txheight,currentheight,-1,0,rewardsum) != 0 )
|
||||
{
|
||||
fprintf(stderr,"error getting %s/v%d\n",tx.vin[i].prevout.hash.GetHex().c_str(),utxovout);
|
||||
return(numsigs);
|
||||
|
||||
Reference in New Issue
Block a user