jl777 8 years ago
parent
commit
d23dadab88
  1. 4
      iguana/dpow/dpow_rpc.c
  2. 4
      iguana/iguana_notary.c

4
iguana/dpow/dpow_rpc.c

@ -464,6 +464,8 @@ struct pax_transaction
cJSON *dpow_paxjson(struct pax_transaction *pax)
{
cJSON *item = cJSON_CreateObject();
if ( pax != 0 )
{
jaddbits256(item,"prev_hash",pax->txid);
jaddnum(item,"prev_vout",pax->vout);
if ( pax->shortflag != 0 )
@ -473,6 +475,7 @@ cJSON *dpow_paxjson(struct pax_transaction *pax)
jaddnum(item,"height",pax->height);
jaddnum(item,"KMD",dstr(pax->komodoshis));
jaddstr(item,"address",pax->coinaddr);
}
return(item);
}
uint64_t dpow_paxtotal()
@ -531,6 +534,7 @@ cJSON *dpow_withdraws_pending(struct dpow_info *dp)
jaddi(retjson,dpow_paxjson(pax));
}
pthread_mutex_unlock(&dp->mutex);
printf("pending.(%s)\n",jprint(retjson,0));
return(retjson);
}

4
iguana/iguana_notary.c

@ -285,11 +285,13 @@ STRING_ARG(dpow,pending,fiat)
for (i=0; fiat[i]!=0; i++)
base[i] = toupper(fiat[i]);
base[i] = 0;
printf("search %d dpows %s\n",myinfo->numdpows,base);
for (i=0; i<myinfo->numdpows; i++)
{
dp = &myinfo->DPOWS[i];
if ( strcmp(dp->symbol,fiat) == 0 )
if ( strcmp(dp->symbol,base) == 0 )
return(jprint(dpow_withdraws_pending(dp),1));
else printf("mismatched i.%d %s\n",i,dp->symbol);
}
}
return(clonestr("[]"));

Loading…
Cancel
Save