Browse Source

Test

etomic
jl777 8 years ago
parent
commit
36904d2262
  1. 12
      iguana/exchanges/LP_nativeDEX.c
  2. 5
      iguana/exchanges/LP_transaction.c

12
iguana/exchanges/LP_nativeDEX.c

@ -20,15 +20,17 @@
// swap cancel should cleanly cancel
// stats
// auto-utxo creation
// getmessage api
// null plocktime, robustify remember
// robustify remember
// false detection of bobreclaim
// verify BTC trading: 0 txfee on remember trades. even with invalid tx, thinks swap is completed RETSTR.({"result":null,"error":{"code":-26,"message":"66: insufficient priority"},"id":"jl777"}
// put Atxfee and Btxfee into rememberfiles
// coded fix: even with invalid tx, thinks swap is completed RETSTR.({"result":null,"error":{"code":-26,"message":"66: insufficient priority"},"id":"jl777"}
//) BTC.0000000000000000000000000000000000000000000000000000000000000000
// unduplicated bugs:
// multiple smartaddresses? enable/disable causes? 250 KMD bounty
// verify bid volumes
// getmessage api
#include <stdio.h>
#include "LP_include.h"
@ -423,11 +425,11 @@ int32_t LP_mainloop_iter(void *ctx,char *myipaddr,struct LP_peerinfo *mypeer,int
//printf("numutxos vs mine.%d\n",LP_mypeer != 0 ? LP_mypeer->numutxos : -1);
if ( LP_mypeer != 0 && LP_mypeer->numutxos < mostutxos && mostpeer != 0 )
{
//printf("myutxos.%d most.%d %s\n",LP_mypeer->numutxos,mostutxos,mostpeer->ipaddr);
printf("myutxos.%d most.%d %s\n",LP_mypeer->numutxos,mostutxos,mostpeer->ipaddr);
LP_peer_utxosquery(LP_mypeer,myport,pubsock,mostpeer,now,30);
//LP_peer_pricesquery(mostpeer->ipaddr,mostpeer->port);
}
if ( (counter % 600) == 10 )
if ( (counter % 6000) == 10 )
{
LP_myutxo_updates(ctx,pubsock,passphrase);
/*if ( lastforward < now-3600 )

5
iguana/exchanges/LP_transaction.c

@ -30,7 +30,8 @@ bits256 LP_broadcast(char *txname,char *symbol,char *txbytes,bits256 expectedtxi
if ( is_hexstr(retstr,0) == 64 )
{
decode_hex(txid.bytes,32,retstr);
sentflag = 1;
if ( bits256_cmp(txid,expectedtxid) == 0 || (bits256_nonz(expectedtxid) == 0 && bits256_nonz(txid) != 0) )
sentflag = 1;
}
else if ( (retjson= cJSON_Parse(retstr)) != 0 )
{
@ -44,7 +45,7 @@ bits256 LP_broadcast(char *txname,char *symbol,char *txbytes,bits256 expectedtxi
}
free_json(retjson);
}
char str[65]; printf("[%s] %s RETSTR.(%s) %s.%s\n",txname,txbytes,retstr,symbol,bits256_str(str,txid));
char str[65]; printf("sentflag.%d [%s] %s RETSTR.(%s) %s.%s\n",sentflag,txname,txbytes,retstr,symbol,bits256_str(str,txid));
free(retstr);
}
if ( sentflag != 0 )

Loading…
Cancel
Save