|
|
@ -425,29 +425,33 @@ STRING_ARG(iguana,addnotary,ipaddr) |
|
|
|
return(clonestr("{\"result\":\"notary node added\"}")); |
|
|
|
} |
|
|
|
|
|
|
|
STRING_ARG(dpow,active,maskhex) |
|
|
|
STRING_ARG(dpow,fundnotaries,symbol) |
|
|
|
{ |
|
|
|
uint8_t data[8],revdata[8]; int32_t i,len; uint64_t mask; cJSON *retjson,*array = cJSON_CreateArray(); |
|
|
|
//return(clonestr("{\"error\":\"dpow active is deprecated for now\"}"));
|
|
|
|
if ( 0 ) |
|
|
|
{ |
|
|
|
int32_t komodo_notaries(char *symbol,uint8_t pubkeys[64][33],int32_t height); |
|
|
|
char CURRENCIES[][16] = { "USD", "EUR", "JPY", "GBP", "AUD", "CAD", "CHF", "NZD", // major currencies
|
|
|
|
"CNY", "RUB", "MXN", "BRL", "INR", "HKD", "TRY", "ZAR", "PLN", "NOK", "SEK", "DKK", "CZK", "HUF", "ILS", "KRW", "MYR", "PHP", "RON", "SGD", "THB", "BGN", "IDR", "HRK", |
|
|
|
"REVS", "SUPERNET", "DEX", "PANGEA", "JUMBLR", "BET", "CRYPTO", "HODL", "SHARK", "BOTS", "MGW" }; |
|
|
|
uint8_t pubkeys[64][33]; char coinaddr[64]; int32_t i,j; double val = 0.01; |
|
|
|
uint8_t pubkeys[64][33]; char coinaddr[64],cmd[1024]; int32_t i,j; double val = 0.01; |
|
|
|
int32_t n = komodo_notaries("KMD",pubkeys,114000); |
|
|
|
//#include "notaries.h"
|
|
|
|
for (i=0; i<sizeof(CURRENCIES)/sizeof(*CURRENCIES); i++) |
|
|
|
{ |
|
|
|
if ( symbol == 0 || symbol[0] == 0 || strcmp(symbol,CURRENCIES[i]) == 0 ) |
|
|
|
{ |
|
|
|
for (j=0; j<n; j++) |
|
|
|
{ |
|
|
|
//decode_hex(pubkeys[j],33,Notaries[j][1]);
|
|
|
|
bitcoin_address(coinaddr,60,pubkeys[j],33); |
|
|
|
printf("./komodo-cli -ac_name=%s sendtoaddress %s %f\n",CURRENCIES[i],coinaddr,val); |
|
|
|
sprintf(cmd,"./komodo-cli -ac_name=%s sendtoaddress %s %f\n",CURRENCIES[i],coinaddr,val); |
|
|
|
if ( system(cmd) != 0 ) |
|
|
|
printf("ERROR with (%s)\n",cmd); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return(clonestr("{\"result\":\"success\"}")); |
|
|
|
} |
|
|
|
|
|
|
|
STRING_ARG(dpow,active,maskhex) |
|
|
|
{ |
|
|
|
uint8_t data[8],revdata[8]; int32_t i,len; uint64_t mask; cJSON *retjson,*array = cJSON_CreateArray(); |
|
|
|
if ( maskhex == 0 || maskhex[0] == 0 ) |
|
|
|
{ |
|
|
|
mask = myinfo->DPOWS[0].lastrecvmask; |
|
|
|