Browse Source

Test

etomic
jl777 7 years ago
parent
commit
318169a018
  1. 6
      iguana/exchanges/LP_swap.c
  2. 5
      iguana/exchanges/LP_transaction.c

6
iguana/exchanges/LP_swap.c

@ -848,10 +848,11 @@ void LP_bobloop(void *_swap)
} }
} }
} }
basilisk_swap_finished(swap);
free(swap);
} else printf("swap timed out\n"); } else printf("swap timed out\n");
G.LP_pendingswaps--; G.LP_pendingswaps--;
basilisk_swap_finished(swap);
free(swap);
free(data);
} }
void LP_aliceloop(void *_swap) void LP_aliceloop(void *_swap)
@ -925,6 +926,7 @@ void LP_aliceloop(void *_swap)
}*/ }*/
if ( swap->N.pair >= 0 ) if ( swap->N.pair >= 0 )
nn_close(swap->N.pair), swap->N.pair = -1; nn_close(swap->N.pair), swap->N.pair = -1;
LP_swap_endcritical = (uint32_t)time(NULL);
LP_swapwait(swap,swap->I.req.requestid,swap->I.req.quoteid,LP_atomic_locktime(swap->I.bobstr,swap->I.alicestr)*2,swap->I.aliceconfirms == 0 ? 3 : 30); LP_swapwait(swap,swap->I.req.requestid,swap->I.req.quoteid,LP_atomic_locktime(swap->I.bobstr,swap->I.alicestr)*2,swap->I.aliceconfirms == 0 ? 3 : 30);
} }
} }

5
iguana/exchanges/LP_transaction.c

@ -733,11 +733,11 @@ char *iguana_validaterawtx(void *ctx,struct iguana_info *coin,struct iguana_msgt
else complete = 1; else complete = 1;
jadd(retjson,"interpreter",log); jadd(retjson,"interpreter",log);
jadd(retjson,"complete",complete!=0?jtrue():jfalse()); jadd(retjson,"complete",complete!=0?jtrue():jfalse());
free(serialized), free(serialized2);
if ( signedtx != 0 ) if ( signedtx != 0 )
free(signedtx); free(signedtx);
free(V); free(V);
} }
free(serialized), free(serialized2);
} }
//char str[65]; printf("got txid.(%s)\n",bits256_str(str,txid)); //char str[65]; printf("got txid.(%s)\n",bits256_str(str,txid));
} }
@ -1325,6 +1325,7 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson)
if ( (ap= LP_address_utxo_reset(coin)) == 0 ) if ( (ap= LP_address_utxo_reset(coin)) == 0 )
{ {
printf("LP_withdraw error utxo reset %s\n",coin->symbol); printf("LP_withdraw error utxo reset %s\n",coin->symbol);
free(V);
return(0); return(0);
} }
privkeys = cJSON_CreateArray(); privkeys = cJSON_CreateArray();
@ -1363,6 +1364,8 @@ char *LP_withdraw(struct iguana_info *coin,cJSON *argjson)
free_json(privkeys), privkeys = 0; free_json(privkeys), privkeys = 0;
if ( rawtx != 0 ) if ( rawtx != 0 )
free(rawtx), rawtx = 0; free(rawtx), rawtx = 0;
if ( signedtx != 0 )
free(signedtx), signedtx = 0;
} }
free(V); free(V);
if ( vins != 0 ) if ( vins != 0 )

Loading…
Cancel
Save