Browse Source

test

etomic
jl777 8 years ago
parent
commit
ad3563336c
  1. 1
      basilisk/basilisk_tradebot.c
  2. BIN
      iguana/confs/BTCD.utxoaddrs.1486500
  3. 1
      iguana/dpow/dpow_rpc.c
  4. 2
      iguana/iguana777.h
  5. 12
      iguana/iguana_payments.c
  6. 2
      iguana/iguana_unspents.c
  7. 2
      iguana/tests/dividends
  8. 2
      iguana/tests/snapshot

1
basilisk/basilisk_tradebot.c

@ -281,6 +281,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk
int32_t i,noquoteflag=0,havequoteflag=0,myrequest=0,maxi=-1; int64_t balance=0,destamount,minamount = 0,maxamount = 0; uint32_t pendingid=0; struct basilisk_swap *active; double metric = 0.;
memset(issueR,0,sizeof(*issueR));
minamount = list[0].minamount;
//bids and asks??
//printf("need to verify null quoteid is list[0] requestid.%u quoteid.%u\n",list[0].requestid,list[0].quoteid);
if ( (active= basilisk_request_started(myinfo,list[0].requestid)) != 0 )
{

BIN
iguana/confs/BTCD.utxoaddrs.1486500

Binary file not shown.

1
iguana/dpow/dpow_rpc.c

@ -1080,6 +1080,7 @@ int32_t dpow_issuer_iteration(struct dpow_info *dp,struct iguana_info *coin,int3
printf("error from %s height.%d currentheight.%d\n",coin->symbol,height,currentheight);
usleep(100000);
}
printf("[%s -> %s] %s ht.%d current.%d\n",dp->symbol,dp->dest,coin->symbol,height,currentheight);
return(height);
}

2
iguana/iguana777.h

@ -40,7 +40,7 @@
#endif
#define LOCKTIME_THRESHOLD 500000000
#define KOMODO_INTEREST ((uint64_t)(0.05 * SATOSHIDEN)) // 5%
#define KOMODO_INTEREST ((uint64_t)(0.05 * SATOSHIDEN)) // 5% CANNOT CHANGE as komodo_interest.h div 20
//#define BTC2_VERSION
#define BTC2_HARDFORK_HEIGHT 444444

12
iguana/iguana_payments.c

@ -364,11 +364,19 @@ uint64_t iguana_interest(struct supernet_info *myinfo,struct iguana_info *coin,b
{
if ( (minutes= ((uint32_t)time(NULL) - 60 - tx->locktime) / 60) >= 60 )
{
numerator = (value * KOMODO_INTEREST);
denominator = (((uint64_t)365 * 24 * 60) / minutes);
if ( denominator == 0 )
denominator = 1; // max KOMODO_INTEREST per transfer, do it at least annually!
interest = (numerator / denominator) / SATOSHIDEN;
if ( value > 25000LL*SATOSHIDEN && height > 155949 )
{
numerator = (value / 20); // assumes 5%!
interest = (numerator / denominator);
}
else
{
numerator = (value * KOMODO_INTEREST);
interest = (numerator / denominator) / SATOSHIDEN;
}
fprintf(stderr,"komodo_interest %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu)\n",(long long)value,(double)value/SATOSHIDEN,tx->locktime,(uint32_t)time(NULL),minutes,(long long)interest,(double)interest/SATOSHIDEN,(long long)numerator,(long long)denominator);
}
}

2
iguana/iguana_unspents.c

@ -1895,6 +1895,8 @@ INT_ARRAY_STRING(iguana,dividends,height,vals,symbol)
}
free(retstr);
retjson = cJSON_CreateObject();
jaddstr(retjson,"coin",symbol);
jaddnum(retjson,"height",height);
jaddnum(retjson,"total",dstr(total));
jaddnum(retjson,"excluded",dstr(excluded));
if ( dust != 0 )

2
iguana/tests/dividends

@ -1,3 +1,3 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"iguana\",\"method\":\"dividends\",\"height\":1486000,\"symbol\":\"BTCD\",\"vals\":{\"exclude\":[\"RWc6VDt5SdjnWXoVQ2AJsuxU2QSaDcG5R7\", \"RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA\"],\"dust\":0,\"dividend\":0,\"system\":0,\"prefix\":\"fiat/revs sendtoaddress\",\"suffix\":\"\"}}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"iguana\",\"method\":\"dividends\",\"height\":1486500,\"symbol\":\"BTCD\",\"vals\":{\"exclude\":[\"RWc6VDt5SdjnWXoVQ2AJsuxU2QSaDcG5R7\", \"RXL3YXG2ceaB6C5hfJcN4fvmLH2C34knhA\"],\"dust\":0,\"dividend\":0,\"system\":0,\"prefix\":\"fiat/revs sendtoaddress\",\"suffix\":\"\"}}"

2
iguana/tests/snapshot

@ -1,3 +1,3 @@
#!/bin/bash
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"iguana\",\"method\":\"snapshot\",\"height\":1486000,\"symbol\":\"BTCD\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"iguana\",\"method\":\"snapshot\",\"height\":1486500,\"symbol\":\"BTCD\"}"

Loading…
Cancel
Save