This commit is contained in:
jl777
2016-11-20 17:15:23 -03:00
parent f360ea0ad0
commit 9ccd3f33c8

View File

@@ -75,12 +75,18 @@ void komodo_gateway_deposit(char *coinaddr,uint64_t value,char *symbol,uint64_t
if ( coinaddr != 0 ) if ( coinaddr != 0 )
{ {
strcpy(pax->coinaddr,coinaddr); strcpy(pax->coinaddr,coinaddr);
pax->komodoshis = value; if ( value != 0 )
strcpy(pax->symbol,symbol); pax->komodoshis = value;
pax->fiatoshis = fiatoshis; if ( symbol != 0 )
memcpy(pax->rmd160,rmd160,20); strcpy(pax->symbol,symbol);
pax->height = height; if ( fiatoshis != 0 )
pax->otherheight = otherheight; pax->fiatoshis = fiatoshis;
if ( rmd160 != 0 )
memcpy(pax->rmd160,rmd160,20);
if ( height != 0 )
pax->height = height;
if ( otherheight != 0 )
pax->otherheight = otherheight;
if ( pax->marked == 0 ) if ( pax->marked == 0 )
{ {
if ( addflag != 0 ) if ( addflag != 0 )
@@ -414,12 +420,13 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
{ {
if ( strncmp((char *)"KMD",(char *)&opretbuf[opretlen-4],3) != 0 ) if ( strncmp((char *)"KMD",(char *)&opretbuf[opretlen-4],3) != 0 )
{ {
if ( (n= komodo_issued_opreturn(base,txids,vouts,values,kmdheights,otherheights,baseids,opretbuf,opretlen,0)) > 0 ) if ( (n= komodo_issued_opreturn(base,txids,vouts,values,kmdheights,otherheights,baseids,rmd160s,opretbuf,opretlen,0)) > 0 )
{ {
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {
bitcoin_address(coinaddr,60,&rmd160s[i*20],20);
if ( komodo_paxmark(height,&space,txids[i],vouts[i],height) == 0 ) if ( komodo_paxmark(height,&space,txids[i],vouts[i],height) == 0 )
komodo_gateway_deposit(0,0,0,0,0,txids[i],vouts[i],height,0); komodo_gateway_deposit(coinaddr,0,0,0,0,txids[i],vouts[i],height,0);
} }
} }
} }