This commit is contained in:
jl777
2017-03-12 21:51:45 +02:00
parent 8db7c5a134
commit c42dd6335c

View File

@@ -591,8 +591,6 @@ int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t to
int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above block is valid pax pricing
{
int32_t i,j,n,ht,num,opretlen,offset=1,errs=0,matched=0,kmdheights[64],otherheights[64]; uint256 hash,txids[64]; char symbol[16],base[16]; uint16_t vouts[64]; int8_t baseids[64]; uint8_t *script,opcode,rmd160s[64*20]; uint64_t available,deposited,issued,withdrawn,approved,redeemed; int64_t values[64],srcvalues[64]; struct pax_transaction *pax; struct komodo_state *sp;
if ( KOMODO_PAX == 0 || komodo_isrealtime(&ht) == 0 || KOMODO_PASSPORT_INITDONE == 0 )
return(0);
memset(baseids,0xff,sizeof(baseids));
memset(values,0,sizeof(values));
memset(srcvalues,0,sizeof(srcvalues));
@@ -602,6 +600,8 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block) // verify above
n = block.vtx[0].vout.size();
script = (uint8_t *)block.vtx[0].vout[n-1].scriptPubKey.data();
fprintf(stderr,"ht.%d n.%d nValue %.8f\n",height,n,dstr(block.vtx[0].vout[1].nValue));
if ( KOMODO_PAX == 0 || komodo_isrealtime(&ht) == 0 || KOMODO_PASSPORT_INITDONE == 0 )
return(0);
if ( n <= 2 || script[0] != 0x6a )
{
if ( n == 2 && block.vtx[0].vout[1].nValue != 0 )