test
This commit is contained in:
@@ -211,9 +211,9 @@ const char *komodo_opreturn(int32_t height,uint64_t value,uint8_t *opretbuf,int3
|
||||
{
|
||||
uint8_t rmd160[20],addrtype,shortflag,pubkey33[33]; int32_t i,j,n,len,tokomodo=0; char base[4],coinaddr[64],destaddr[64]; uint256 txids[64]; uint16_t vouts[64]; int64_t fiatoshis,checktoshis; const char *typestr = "unknown";
|
||||
tokomodo = (komodo_is_issuer() == 0);
|
||||
for (i=0; i<opretlen; i++)
|
||||
printf("%02x",opretbuf[i]);
|
||||
printf(" DEPOSIT.[%c] tokomodo.%d %.8f %c%s -> %s ",opretbuf[0],tokomodo,dstr(fiatoshis),shortflag!=0?'-':'+',base,coinaddr);
|
||||
//for (i=0; i<opretlen; i++)
|
||||
// printf("%02x",opretbuf[i]);
|
||||
//printf(" DEPOSIT.[%c] tokomodo.%d %.8f %c%s -> %s ",opretbuf[0],tokomodo,dstr(fiatoshis),shortflag!=0?'-':'+',base,coinaddr);
|
||||
if ( opretbuf[0] == ((tokomodo == 0) ? 'D' : 'W') )
|
||||
{
|
||||
if ( opretlen == 34 )
|
||||
@@ -377,6 +377,7 @@ void komodo_gateway_iteration(char *symbol)
|
||||
char *retstr; int32_t i,kmdheight; cJSON *infoobj,*result; uint256 zero; uint16_t port = 7771;
|
||||
if ( KMDHEIGHT <= 0 )
|
||||
KMDHEIGHT = 1;
|
||||
KOMODO_REALTIME = 0;
|
||||
if ( (retstr= komodo_issuemethod((char *)"getinfo",0,port)) != 0 )
|
||||
{
|
||||
if ( (infoobj= cJSON_Parse(retstr)) != 0 )
|
||||
@@ -396,6 +397,8 @@ void komodo_gateway_iteration(char *symbol)
|
||||
printf("error KMDHEIGHT %d\n",KMDHEIGHT);
|
||||
break;
|
||||
}
|
||||
if ( KMDHEIGHT == kmdheight )
|
||||
KOMODO_REALTIME = (uint32_t)time(NULL);
|
||||
usleep(10000);
|
||||
}
|
||||
}
|
||||
@@ -409,16 +412,3 @@ void komodo_gateway_iteration(char *symbol)
|
||||
sleep(30);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef KOMODO_ISSUER
|
||||
void komodo_gateway_issuer() // from "assetchain" connectblock()
|
||||
{
|
||||
// check for redeems
|
||||
}
|
||||
#else
|
||||
|
||||
void komodo_gateway_redeemer() // from "KMD" connectblock()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user