Browse Source

Deprecate internal Notaries[] completely, use elected file

jl777
jl777 7 years ago
parent
commit
897465813e
  1. 4
      iguana/dpow/dpow_network.c
  2. 25
      iguana/iguana_notary.c
  3. 4
      iguana/main.c
  4. 44
      iguana/notaries.h

4
iguana/dpow/dpow_network.c

@ -984,7 +984,7 @@ int32_t _dex_getheight(struct supernet_info *myinfo,char *symbol)
return(height);
}
char *_dex_getnotaries(struct supernet_info *myinfo,char *symbol)
/*char *_dex_getnotaries(struct supernet_info *myinfo,char *symbol)
{
struct dex_request dexreq; char *retstr,*pubkeystr; cJSON *retjson,*array,*item; int32_t i,n;
memset(&dexreq,0,sizeof(dexreq));
@ -1018,7 +1018,7 @@ char *_dex_getnotaries(struct supernet_info *myinfo,char *symbol)
}
}
return(retstr);
}
}*/
char *_dex_alladdresses(struct supernet_info *myinfo,char *symbol)
{

25
iguana/iguana_notary.c

@ -20,7 +20,7 @@
#define CHECKSIG 0xac
#include "iguana777.h"
#include "notaries.h"
//#include "notaries.h"
int32_t dpow_datahandler(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp,uint8_t nn_senderind,uint32_t channel,uint32_t height,uint8_t *data,int32_t datalen);
uint64_t dpow_maskmin(uint64_t refmask,struct dpow_block *bp,int8_t *lastkp);
@ -722,16 +722,23 @@ STRING_AND_INT(dpow,fundnotaries,symbol,numblocks)
STRING_ARG(dpow,active,maskhex)
{
uint8_t data[8],revdata[8]; int32_t i,len; uint64_t mask; cJSON *retjson,*array = cJSON_CreateArray();
uint8_t data[8],revdata[8],pubkeys[64][33]; char pubkeystr[67]; int32_t i,len,current,n; uint64_t mask; cJSON *infojson,*retjson,*array = cJSON_CreateArray();
if ( (infojson= dpow_getinfo(myinfo,coin)) != 0 )
{
current = jint(infojson,"blocks");
free_json(infojson);
} else return(clonestr("{\"error\":\"cant get current height\"}"));
n = komodo_notaries("KMD",pubkeys,current);
if ( maskhex == 0 || maskhex[0] == 0 )
{
mask = myinfo->DPOWS[0].lastrecvmask;
for (i=0; i<64; i++)
for (i=0; i<n; i++)
{
if ( ((1LL << i) & mask) != 0 )
{
printf("(%d %llx %s) ",i,(long long)(1LL << i),Notaries[i][0]);
jaddistr(array,Notaries[i][0]);
init_hexbytes_noT(pubkeystr,pubkeys[i],33);
printf("(%d %llx %s) ",i,(long long)(1LL << i),pubkeystr);
jaddistr(array,pubkeystr);
}
}
retjson = cJSON_CreateObject();
@ -755,8 +762,9 @@ STRING_ARG(dpow,active,maskhex)
for (i=0; i<(len<<3); i++)
if ( ((1LL << i) & mask) != 0 )
{
printf("(%d %llx %s) ",i,(long long)(1LL << i),Notaries[i][0]);
jaddistr(array,Notaries[i][0]);
init_hexbytes_noT(pubkeystr,pubkeys[i],33);
printf("(%d %llx %s) ",i,(long long)(1LL << i),pubkeystr);
jaddistr(array,pubkeystr);
}
return(jprint(array,1));
} else return(clonestr("{\"error\":\"maskhex too long\"}"));
@ -968,7 +976,8 @@ STRING_ARG(dex,psock,argstr)
STRING_ARG(dex,getnotaries,symbol)
{
return(_dex_getnotaries(myinfo,symbol));
return(clonestr("{\"error\":\"dexgetnotaries deprecated\"}"));
//return(_dex_getnotaries(myinfo,symbol));
}
TWO_STRINGS(dex,kvsearch,symbol,key)

4
iguana/main.c

@ -2273,12 +2273,12 @@ void iguana_main(void *arg)
#ifdef __APPLE__
iguana_appletests(myinfo);
#endif
char *retstr;
/*char *retstr;
if ( (retstr= _dex_getnotaries(myinfo,"KMD")) != 0 )
{
printf("INITIAL NOTARIES.(%s)\n",retstr);
free(retstr);
}
}*/
}
}
else

44
iguana/notaries.h

@ -15,7 +15,7 @@
#ifndef INCLUDE_NOTARIES_H
#define INCLUDE_NOTARIES_H
/*
char *Notaries[][2] =
{
{ "jl777_testA", "03b7621b44118017a16043f19b30cc8a4cfe068ac4e42417bae16ba460c80f3828" },
@ -56,46 +56,6 @@ char *Notaries[][2] =
{ "artik_NA", "0224e31f93eff0cc30eaf0b2389fbc591085c0e122c4d11862c1729d090106c842" },
{ "eclips_EU", "0339369c1f5a2028d44be7be6f8ec3b907fdec814f87d2dead97cab4edb71a42e9" },
{ "titomane_SH", "035f49d7a308dd9a209e894321f010d21b7793461b0c89d6d9231a3fe5f68d9960" },
/*{ "Server1","0221876c8259764224dc1a7b70ec956f3fbe9a768cd77f13082cfa60eb6aa2d068"},
{ "Server2","03c7c14e6b1f94585bb571cf3ee5eb9b9ab54bd23d0acb8cf13edad1c515842b66"},
{ "Server3","02d28f8992ff0cd68c5d558cf55ec5b3ada25151519a6cea8cef1bac04c40023b6"},
{ "Server4","02adc84814fee5864e67fd1b76f97fbe74d6bd07c62335e2f1da918f46d08d84ba"},
{ "Server5","033dcf1c8308a00533fd3206c2db4f38ace0e08ae089a93efd873c8a2f80c4a620"},
{ "Server6","030f9f354cc8e2eaead1d978cc4db7009715083220fe48252fb0b0680d3a63d5a4"},
{ "Server7","0235d73cf8bc250e7a7032898423f24e240f1267a3c809a557daa3c17108d7585e"},
{ "Server8","03feea6d8ce239043baa9f3c9a1f15213dd4ac73df2bae5da71034f803dc005587"},
{ "Server9","02bfe32e6ce78c3795f0a2aa7e0dd47c51c674742f99ba9a0aec6d0d82d3d476b0"},
{ "Server10","037b46bdc3933fda6f47d14c8931fb8fffc4db85e0981ec4857fd56ee43300a29a"},
{ "Server11","03e6e375c5d36ebfbef9bd97c8cacb2d7a8f54bf89926ebde77fe7cc8cfb3c8e89"},
{ "Server12","032eff141519c1c4b111b1e51e9c4306c9dcfab9357fd27291daa5c6b3736c59d7"},
{ "Server13","03ae5eb57512a756031f7fd516d0f46e984632f73855fdf53fd4a08fbdef284af0"},
{ "Server14","03755d02c5aab06def772438d2a3b3d98d316091747e12b4e85b3a253cf757a730"},
{ "Server15","0260348f92cde87639ba9afc9f02b2c71ab52dc5faa00d175d0e331f71c05a521c"},
{ "Server16","02714f1922b72cce03633720402783de4962432adb3d3e38c95da754d43926e6f5"},
{ "Server17","028a2957cd7b428c3ba7ee2974e8dbbed0ee836721d00db6ea66db8f65c163a582"},
{ "Server18","033b24621b85b0593a7dae5867d112d8b80406369b8b07dde8be6ec6eb123de5aa"},
{ "Server19","0334556377815054bc39eb67186b02bd44ffe5acc9547516de0a639bcb947e2afb"},
{ "Server20","02564d75bed700f431eaabd087d1fbf59a566775ec146a65ad5137cd6ca0ff9c6d"},
{ "Server21","02345e3f2d281b0109cdcae6c70728027801060f231fc740b258c48aa43d75de0d"},
{ "Server22","0224991d534b187e9636d47253b2769fba299a0649c39615f2f31997052345c37c"},
{ "Server23","021a5deb5336e7d914f84616243c12e45268941449f7f0eb6e9d6772e0a605a9af"},
{ "Server24","036f5ae3b01b030acf6d6bc987feec5de5c340ff43887834af18fb0dee3961967c"},
{ "Server25","0377e432331fcca2e39324fdb815ab91171f26d7b838de04b39e4a5787966bf10c"},
{ "Server26","02ac499362e35c2d47b83c3c985abced6f3cb8b3f5c872a1b5806e2abba175a497"},
{ "Server27","0269611d0a1eedc67c323b2e17d332731e267c4c25716f1fa956ce027f7bae787f"},
{ "Server28","0203835a4c208a2a7ae5bafea393f04aaf6e863c93a3bd61f3a59a2383b1f7af31"},
{ "Server29","02ffc70831ca50e4d44f67462405fba12df7b01477e55c12ef6e696e4b1522ce3b"},
{ "Server30","022ab58e8ee541952f9f992890335097fa18479b5f66ad5f1f4a0e8f60959f3d19"},*/
};
// RNJmgYaFF5DbnrNUX6pMYz9rcnDKC2tuAc RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 RVKtRKozg8RKvEYCumMD43fCU6f212M5RD RDW8EDkCkzQ1LA4xbVUoAERsBVhhYRLXCr RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp RJKWU7f77YVUHBgrfcTGHje26k7pfkkU3t RLVwuTM5TitV4Gk79Rja731RwYkAzz7GWn RNZKqUgoAPwWd7wNtuSKP7k1HSJAyPeH4N RVxtoUT9CXbC1LdhztNAf9yR5ySnFnSPQh RAxQTHdsy89tfSXwoce2sHeWrYXmDsMXQq RLNJ873AQ8Cnr8UfhRm9SXiVDaphoa4JTo RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j RP4FSezvuXsBpfxj5sByJDneFB3XC9yNe5 RXqdRmv7n9hygf9C7f7vj4VQyNR9RvzXss RGosMyyAo573NrBdqUiQYQDsnV6kyY2oiq RDYsrWBZkYSWhRDupGRrfGqrVnFtK9hJGC RTw3vi3dGa9n8LLbKvk7jDAwLdt3A5ET7a RDY9LJZTEJ9FsvugUuD69gceA98uqan5XL R9tjkpdNbzw6mNfxorb5bvTPmsuon5aLrC R9Wtb6jReE9GrePGkCHzuyxD3hTTrnMcGY RRvaVyKS59NJWhPp8Pn7mVPGhMuhJJXrdh RSHdRnHHGdPtVej7fiehHBQ6dyTbEM1GHi RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPVMY RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s RT2k2voy9n8jwppeTTJMQAhvaqA9pc9jHh RPJjzoKPb8idoUCT9XLBkNojNgysjJ5qrE RE3P8D8rcWZBeKmT8DURPdezW87MU5Ho3F RQeuhk4KcPM3F5hefwTBWezDdcktSGQQSq RFHRWQ5pAXNfmudHfxdxw3Wo8yFGoeDn6z RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi RFssbc211PJdVy1bvcvAG5X2N4ovPAoy5o Numnotaries.32
/*RHASfhhM6bvDFakRDqkzA2wc3V4R4oNmXi c3a2395a3bb498ff684fd6730c205c691056364edaa71e70b1d74203bc52b57d
RDhEGYScNQYetCyG75Kf8Fg61UWPdwc1C5 ae2af56ca7f6cd178379a3c552c3681c99eba797b01f535ff1a743ca09485dea
RVKtRKozg8RKvEYCumMD43fCU6f212M5RD ade9979549cf703c6e997934f6116debe0ea2d5dd4f51665d9dfbef1fcc7d08a
RREc88bQzxHCvzqErPDnTQH2Qg5yUtjbyp b1269e90a052b3d3b5a2fc35cb7385e72bb36b2633ca824eb45291bc10d96795
RCA8H1npFPW5pnJRzycF8tFEJmn6XZhD4j aec351cea264ff7411a32554edbd75df76bb47dbbf038fdc150284e325b319a7
RJ9wAk3ZNrFwdso1RVbwASiqqQaDNyKjd2 a075c4800c538000be07eb25b4b521caa54c807385b932b790feba410c74b2aa
RHPGxpiwRHP4dKZXjYPdpon1nCto7qVE8s a036d9a442cb3275ca2f017fea4330c89619ea113820aff720d5f5ad0c9755e9*/
*/
#endif

Loading…
Cancel
Save