From 8be6b10c5e810c4935e52e489947e1665644778b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 1 Jan 2017 15:12:53 +0200 Subject: [PATCH] fundnotaries --- iguana/iguana_notary.c | 34 +++++++++++++++++++--------------- iguana/tests/fundnotaries | 2 ++ includes/iguana_apideclares.h | 2 ++ 3 files changed, 23 insertions(+), 15 deletions(-) create mode 100755 iguana/tests/fundnotaries diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 9f1a6b158..fe831f8ef 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -425,29 +425,33 @@ STRING_ARG(iguana,addnotary,ipaddr) return(clonestr("{\"result\":\"notary node added\"}")); } -STRING_ARG(dpow,active,maskhex) -{ - 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 ) +STRING_ARG(dpow,fundnotaries,symbol) +{ + 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],cmd[1024]; int32_t i,j; double val = 0.01; + int32_t n = komodo_notaries("KMD",pubkeys,114000); + for (i=0; iDPOWS[0].lastrecvmask; diff --git a/iguana/tests/fundnotaries b/iguana/tests/fundnotaries new file mode 100755 index 000000000..f36590638 --- /dev/null +++ b/iguana/tests/fundnotaries @@ -0,0 +1,2 @@ +#!/bin/bash +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dpow\",\"method\":\"fundnotaries\",\"symbol\":\"$1\"}" diff --git a/includes/iguana_apideclares.h b/includes/iguana_apideclares.h index fc5bc5e6c..142b944fb 100755 --- a/includes/iguana_apideclares.h +++ b/includes/iguana_apideclares.h @@ -20,6 +20,8 @@ TWOINTS_AND_ARRAY(dpow,ratify,minsigs,timestamp,ratified); ZERO_ARGS(dpow,cancelratify); THREE_STRINGS(iguana,passthru,asset,function,hex); STRING_ARG(dpow,bindaddr,ipaddr); +STRING_ARG(dpow,fundnotaries,symbol); + TWO_STRINGS(dex,send,hex,handler); HASH_AND_STRING(dex,gettransaction,txid,symbol); STRING_ARG(dex,getinfo,symbol);