@ -2340,7 +2340,7 @@ int32_t iguana_scriptgen(uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,int32_t
return ( scriptlen ) ;
return ( scriptlen ) ;
}
}
int32_t bitcoin_scriptget ( uint8_t taddr , uint8_t pubtype , uint8_t p2shtype , int32_t * hashtypep , uint32_t * sigsizep , uint32_t * pubkeysizep , uint8_t * * userdatap , uint32_t * userdatalenp , struct vin_info * vp , uint8_t * scriptsig , int32_t len , int32_t spendtype )
int32_t bitcoin_scriptget ( uint8_t taddr , uint8_t pubtype , uint8_t p2shtype , u int32_t * hashtypep , uint32_t * sigsizep , uint32_t * pubkeysizep , uint8_t * * userdatap , uint32_t * userdatalenp , struct vin_info * vp , uint8_t * scriptsig , int32_t len , int32_t spendtype )
{
{
int32_t j , n , siglen , plen ; uint8_t * p2shscript ;
int32_t j , n , siglen , plen ; uint8_t * p2shscript ;
j = n = 0 ;
j = n = 0 ;
@ -3248,7 +3248,7 @@ int32_t iguana_vinarray_check(cJSON *vinarray,bits256 txid,int32_t vout)
int32_t iguana_rwmsgtx ( uint8_t taddr , uint8_t pubtype , uint8_t p2shtype , uint8_t isPoS , int32_t height , int32_t rwflag , cJSON * json , uint8_t * serialized , int32_t maxsize , struct iguana_msgtx * msg , bits256 * txidp , char * vpnstr , uint8_t * extraspace , int32_t extralen , cJSON * vins , int32_t suppress_pubkeys , int32_t zcash ) ;
int32_t iguana_rwmsgtx ( uint8_t taddr , uint8_t pubtype , uint8_t p2shtype , uint8_t isPoS , int32_t height , int32_t rwflag , cJSON * json , uint8_t * serialized , int32_t maxsize , struct iguana_msgtx * msg , bits256 * txidp , char * vpnstr , uint8_t * extraspace , int32_t extralen , cJSON * vins , int32_t suppress_pubkeys , int32_t zcash ) ;
bits256 bitcoin_sigtxid ( uint8_t taddr , uint8_t pubtype , uint8_t p2shtype , uint8_t isPoS , int32_t height , uint8_t * serialized , int32_t maxlen , struct iguana_msgtx * msgtx , int32_t vini , uint8_t * spendscript , int32_t spendlen , int32_t hashtype , char * vpnstr , int32_t suppress_pubkeys , int32_t zcash )
bits256 bitcoin_sigtxid ( uint8_t taddr , uint8_t pubtype , uint8_t p2shtype , uint8_t isPoS , int32_t height , uint8_t * serialized , int32_t maxlen , struct iguana_msgtx * msgtx , int32_t vini , uint8_t * spendscript , int32_t spendlen , u int32_t hashtype , char * vpnstr , int32_t suppress_pubkeys , int32_t zcash )
{
{
int32_t i , len ; bits256 sigtxid , txid , revsigtxid ; struct iguana_msgtx dest ;
int32_t i , len ; bits256 sigtxid , txid , revsigtxid ; struct iguana_msgtx dest ;
dest = * msgtx ;
dest = * msgtx ;
@ -3500,8 +3500,12 @@ int32_t iguana_rwmsgtx(uint8_t taddr,uint8_t pubtype,uint8_t p2shtype,uint8_t is
memset ( sigtxid . bytes , 0 , sizeof ( sigtxid ) ) ;
memset ( sigtxid . bytes , 0 , sizeof ( sigtxid ) ) ;
if ( vins ! = 0 & & jitem ( vins , i ) ! = 0 )
if ( vins ! = 0 & & jitem ( vins , i ) ! = 0 )
{
{
uint32_t sighash ;
iguana_vinobjset ( & msg - > vins [ i ] , jitem ( vins , i ) , spendscript , sizeof ( spendscript ) ) ;
iguana_vinobjset ( & msg - > vins [ i ] , jitem ( vins , i ) , spendscript , sizeof ( spendscript ) ) ;
sigtxid = bitcoin_sigtxid ( taddr , pubtype , p2shtype , isPoS , height , sigser , maxsize * 2 , msg , i , msg - > vins [ i ] . spendscript , msg - > vins [ i ] . spendlen , SIGHASH_ALL , vpnstr , suppress_pubkeys , zcash ) ;
sighash = SIGHASH_ALL ;
if ( zcash = = LP_IS_BITCOINCASH )
sighash | = SIGHASH_FORKID ;
sigtxid = bitcoin_sigtxid ( taddr , pubtype , p2shtype , isPoS , height , sigser , maxsize * 2 , msg , i , msg - > vins [ i ] . spendscript , msg - > vins [ i ] . spendlen , sighash , vpnstr , suppress_pubkeys , zcash ) ;
//printf("after vini.%d vinscript.%p spendscript.%p spendlen.%d (%s)\n",i,msg->vins[i].vinscript,msg->vins[i].spendscript,msg->vins[i].spendlen,jprint(jitem(vins,i),0));
//printf("after vini.%d vinscript.%p spendscript.%p spendlen.%d (%s)\n",i,msg->vins[i].vinscript,msg->vins[i].spendscript,msg->vins[i].spendlen,jprint(jitem(vins,i),0));
if ( iguana_vinarray_check ( vinarray , msg - > vins [ i ] . prev_hash , msg - > vins [ i ] . prev_vout ) < 0 )
if ( iguana_vinarray_check ( vinarray , msg - > vins [ i ] . prev_hash , msg - > vins [ i ] . prev_vout ) < 0 )
jaddi ( vinarray , iguana_vinjson ( & msg - > vins [ i ] , sigtxid ) ) ;
jaddi ( vinarray , iguana_vinjson ( & msg - > vins [ i ] , sigtxid ) ) ;