Browse Source

Test

etomic
jl777 7 years ago
parent
commit
197e2212ea
  1. 3
      iguana/exchanges/LP_transaction.c
  2. 1
      iguana/exchanges/LP_zeroconf.c

3
iguana/exchanges/LP_transaction.c

@ -980,8 +980,9 @@ cJSON *LP_inputjson(bits256 txid,int32_t vout,char *spendscriptstr)
uint64_t _komodo_interestnew(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime) uint64_t _komodo_interestnew(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime)
{ {
int32_t minutes; uint64_t interest = 0; int32_t minutes; uint64_t interest = 0;
if ( (minutes= (tiptime - nLockTime) / 60) >= 60 ) if ( tiptime > nLockTime && (minutes= (tiptime - nLockTime) / 60) >= 60 )
{ {
//minutes.71582779 tiptime.1511292969 locktime.1511293505
printf("minutes.%d tiptime.%u locktime.%u\n",minutes,tiptime,nLockTime); printf("minutes.%d tiptime.%u locktime.%u\n",minutes,tiptime,nLockTime);
if ( minutes > 365 * 24 * 60 ) if ( minutes > 365 * 24 * 60 )
minutes = 365 * 24 * 60; minutes = 365 * 24 * 60;

1
iguana/exchanges/LP_zeroconf.c

@ -68,6 +68,7 @@ char *LP_zeroconf_deposit(struct iguana_info *coin,int32_t weeks,double amount,i
jdelete(retjson,"result"); jdelete(retjson,"result");
jaddstr(retjson,"address",p2shaddr); jaddstr(retjson,"address",p2shaddr);
jaddnum(retjson,"expiration",timestamp); jaddnum(retjson,"expiration",timestamp);
jaddnum(retjson,"deposit",amount);
if ( (obj= jobj(retjson,"complete")) != 0 && is_cJSON_True(obj) != 0 && (hexstr= jstr(retjson,"hex")) != 0 ) if ( (obj= jobj(retjson,"complete")) != 0 && is_cJSON_True(obj) != 0 && (hexstr= jstr(retjson,"hex")) != 0 )
{ {
txid = jbits256(retjson,"txid"); txid = jbits256(retjson,"txid");

Loading…
Cancel
Save