Browse Source

Test

etomic
jl777 8 years ago
parent
commit
5702444a83
  1. 2
      .gitignore
  2. 3
      basilisk/basilisk_swap.c
  3. 16
      crypto777/cJSON.c
  4. 1
      iguana/DB/SWAPS/3210648667-2626363704
  5. 1
      iguana/DB/SWAPS/415703857-2769362858

2
.gitignore

@ -352,3 +352,5 @@ iguana/DB/SWAPS/26534791-3105729230
iguana/DB/SWAPS/2279906047-2580050792
iguana/DB/SWAPS/1672096208-4211948211
iguana/DB/SWAPS/3062665554-3128383014

3
basilisk/basilisk_swap.c

@ -2905,7 +2905,8 @@ bits256 basilisk_swap_spendtxid(struct supernet_info *myinfo,char *symbol,char *
{
for (i=0; i<n; i++)
{
item = jitem(array,i);
if ( (item= jitem(array,i)) == 0 )
continue;
txid = jbits256(item,"txid");
if ( bits256_nonz(txid) == 0 )
{

16
crypto777/cJSON.c

@ -546,7 +546,7 @@ static char *print_object(cJSON *item,int32_t depth,int32_t fmt)
/* Get Array size/item / object item. */
int32_t cJSON_GetArraySize(cJSON *array) {cJSON *c; if ( array == 0 ) return(0); c=array->child;int32_t i=0;while(c)i++,c=c->next;return i;}
cJSON *cJSON_GetArrayItem(cJSON *array,int32_t item) {cJSON *c=array->child; while (c && item>0) item--,c=c->next; return c;}
cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object->child; while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;}
cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) { if ( object == 0 ) return(0); cJSON *c=object->child; while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;}
/* Utility for array list handling. */
static void suffix_object(cJSON *prev,cJSON *item) {prev->next=item;item->prev=prev;}
@ -858,7 +858,7 @@ bits256 get_API_bits256(cJSON *obj)
}
return(hash);
}
bits256 jbits256(cJSON *json,char *field) { if ( field == 0 ) return(get_API_bits256(json)); return(get_API_bits256(cJSON_GetObjectItem(json,field))); }
bits256 jbits256(cJSON *json,char *field) { if ( field == 0 ) return(get_API_bits256(json)); return(get_API_bits256(json != 0 ? cJSON_GetObjectItem(json,field) : 0)); }
bits256 jbits256i(cJSON *json,int32_t i) { return(get_API_bits256(cJSON_GetArrayItem(json,i))); }
void jaddbits256(cJSON *json,char *field,bits256 hash) { char str[65]; bits256_str(str,hash), jaddstr(json,field,str); }
void jaddibits256(cJSON *json,bits256 hash) { char str[65]; bits256_str(str,hash), jaddistr(json,str); }
@ -896,10 +896,14 @@ int32_t jnum(cJSON *obj,char *field)
void ensure_jsonitem(cJSON *json,char *field,char *value)
{
cJSON *obj = cJSON_GetObjectItem(json,field);
if ( obj == 0 )
cJSON_AddItemToObject(json,field,cJSON_CreateString(value));
else cJSON_ReplaceItemInObject(json,field,cJSON_CreateString(value));
cJSON *obj;
if ( json != 0 )
{
obj = cJSON_GetObjectItem(json,field);
if ( obj == 0 )
cJSON_AddItemToObject(json,field,cJSON_CreateString(value));
else cJSON_ReplaceItemInObject(json,field,cJSON_CreateString(value));
}
}
int32_t in_jsonarray(cJSON *array,char *value)

1
iguana/DB/SWAPS/3210648667-2626363704

@ -0,0 +1 @@
{"src":"KMD","srcamount":99.65000000,"dest":"BTC","destamount":0.01279725,"requestid":3210648667,"quoteid":2626363704,"iambob":0,"state":63,"otherstate":191,"expiration":1492382391,"dlocktime":0,"plocktime":0,"secretAm":"41d77f89b7df4e6b4e037271af7171e5700ff78e","secretAm256":"2430481e893a8eb5dfebd803bad5e5db5dbfd7c4229e89c3412599688faaf6f4","secretBn":"58e3ed498bca71df2a09e4e083e1bfceaf37f17c","secretBn256":"4cbf23818c8ba08fc84634f2a4673f87b4ddb7b770910c83618c23478a16aed0","myprivs0":"e2f1c99ade4b40d6044db7fcc1c8440d754d984a32c29ef46fc70dc403cc5d6e","myprivs1":"7d252f9dd6ed55d4f2ac51672488c93c242bf96daab6fd9598eeced20150e8e9","privAm":"81956df0209ade7820e3642b0f1380a602670b96902f2622a4f6a454f571bbb2","pubA0":"46f8aa71581ffd70dfa22fc6fa7a1a287ba917e7eef4f28806b111fb5f2e6da3","pubB0":"2da1f98d4a628a5da9a0959db46b970dbfb41762c024123877cc7539149587ed","pubB1":"a5f17406afbcc29c0ffe103a672dd2457f833b6316439d81ee5d48afa3ae4070","myfee":"3415b8ed8853d86f986e4a932bb7d8f1b241a87b4b61e8597383f4c7dec90c2c","dest33":"025dddc7a1581b13535114dd4e6332f37420da35598b98d27ca319870abb9de7af"}

1
iguana/DB/SWAPS/415703857-2769362858

@ -0,0 +1 @@
{"src":"BTC","srcamount":0.01577619,"dest":"KMD","destamount":118.45892649,"requestid":415703857,"quoteid":2769362858,"iambob":0,"state":1791,"otherstate":447,"expiration":1492383936,"dlocktime":1492383941,"plocktime":0,"secretAm":"218ec768f2df38385a08d3f3e0fd71c540243c69","secretAm256":"40cf46bc360cc79d8f29f2d3adb8cfd5d982b457a61b674dc3b3e9217c3e4496","secretBn":"86fe3a6d10f99d7396827c44767ef314d64a56d6","secretBn256":"bdf4fae7a167f185710269f3622bca4a254bf071751d2e1d7952be8a4a7c8208","myprivs0":"76605da8755998f3a8ede4920832754b6908a8ca01f3a68158a7e6b2da0711f4","myprivs1":"e4b2399987c4aff65cf73005361f182170e0de5a81e9ce6ed5cd74ad99554bf0","privAm":"baeb51e6ee3c4738482fbb352b3f097c23fb3e7e39b0836a6cbd115948e1f31d","pubA0":"7772d4a1471ada1ee192ff955c7115727ddff3383636949725c0307dfebc9eae","pubB0":"286f4c28533f12e50f328f481b73dd66fd4af3f18b6a65818ed1ff897e834e39","pubB1":"e0c4109251f7da8301e027d85b5d0dad95291362b835e003aa686dad326b5fe0","Bdeposit":"771c758300c47f6c63531e1f2cc50e57c96aaf014ef10004c0afcce64899bfdb","Apayment":"6f5ef3b1e7cd72a778abd167cc5c3a72224c1910c5d03167ee043bb003132b3e","myfee":"6f477936082053496fe46cd3a50d58a88c489e81e09db8b5781c279c4224eb6b","dest33":"0231a71ac00aed93b79f5b751d6b498cb1151314a18607328d5e79aec71deac205"}
Loading…
Cancel
Save