|
|
@ -148,6 +148,8 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he |
|
|
|
{ |
|
|
|
if ( (i % DPOW_MAXFREQ) != 0 && (bp= dp->blocks[i]) != 0 && bp->state == 0xffffffff ) |
|
|
|
{ |
|
|
|
if ( dp->currentbp == dp->blocks[i] ) |
|
|
|
dp->currentbp = 0; |
|
|
|
dp->blocks[i] = 0; |
|
|
|
Numallocated--; |
|
|
|
free(bp); |
|
|
@ -858,10 +860,11 @@ STRING_AND_INT(dpow,fundnotaries,symbol,numblocks) |
|
|
|
} |
|
|
|
|
|
|
|
extern char *Notaries_elected[65][2]; |
|
|
|
cJSON *dpow_recvmasks(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_block *bp); |
|
|
|
|
|
|
|
STRING_ARG(dpow,active,maskhex) |
|
|
|
{ |
|
|
|
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,*notarray; |
|
|
|
uint8_t data[8],revdata[8],pubkeys[64][33]; int32_t i,len,current,n; uint64_t mask; cJSON *infojson,*retjson,*array,*notarray; |
|
|
|
array = cJSON_CreateArray(); |
|
|
|
notarray = cJSON_CreateArray(); |
|
|
|
if ( (infojson= dpow_getinfo(myinfo,coin)) != 0 ) |
|
|
@ -872,7 +875,9 @@ STRING_ARG(dpow,active,maskhex) |
|
|
|
n = komodo_notaries("KMD",pubkeys,current); |
|
|
|
if ( maskhex == 0 || maskhex[0] == 0 ) |
|
|
|
{ |
|
|
|
mask = myinfo->DPOWS[0]->lastrecvmask; |
|
|
|
return(jprint(dpow_recvmasks(myinfo,myinfo->DPOWS[0],myinfo->DPOWS[0]->currentbp),1)); |
|
|
|
|
|
|
|
/*mask = myinfo->DPOWS[0]->lastrecvmask;
|
|
|
|
for (i=0; i<n; i++) |
|
|
|
{ |
|
|
|
if ( ((1LL << i) & mask) != 0 ) |
|
|
@ -885,7 +890,7 @@ STRING_ARG(dpow,active,maskhex) |
|
|
|
retjson = cJSON_CreateObject(); |
|
|
|
jadd64bits(retjson,"recvmask",mask); |
|
|
|
jadd(retjson,"notaries",array); |
|
|
|
return(jprint(retjson,1)); |
|
|
|
return(jprint(retjson,1));*/ |
|
|
|
} |
|
|
|
//printf("dpow active (%s)\n",maskhex);
|
|
|
|
if ( (len= (int32_t)strlen(maskhex)) <= 16 ) |
|
|
|