Browse Source

Test

etomic
jl777 7 years ago
parent
commit
d051f5f8ba
  1. 22
      iguana/exchanges/LP_nativeDEX.c
  2. 16
      iguana/exchanges/LP_statemachine.c

22
iguana/exchanges/LP_nativeDEX.c

@ -807,10 +807,10 @@ void LP_pubkeysloop(void *ctx)
coin->lastunspent = (uint32_t)time(NULL);
}
}*/
HASH_ITER(hh,LP_pubkeyinfos,pubp,ptmp)
/*HASH_ITER(hh,LP_pubkeyinfos,pubp,ptmp)
{
pubp->dynamictrust = LP_dynamictrust(pubp->pubkey,0);
}
}*/
if ( time(NULL) > lasttime+LP_ORDERBOOK_DURATION*0.5 )
{
//printf("LP_pubkeysloop %u\n",(uint32_t)time(NULL));
@ -821,7 +821,7 @@ void LP_pubkeysloop(void *ctx)
}
}
void LP_privkeysloop(void *ctx)
/*void LP_privkeysloop(void *ctx)
{
strcpy(LP_privkeysloop_stats.name,"LP_privkeysloop");
LP_privkeysloop_stats.threshold = (LP_ORDERBOOK_DURATION * .8 * 1000) + 10000;
@ -834,7 +834,7 @@ void LP_privkeysloop(void *ctx)
LP_privkey_updates(ctx,LP_mypubsock,0);
sleep(LP_ORDERBOOK_DURATION * .777);
}
}
}*/
void LP_swapsloop(void *ignore)
{
@ -1050,20 +1050,6 @@ void LPinit(uint16_t myport,uint16_t mypullport,uint16_t mypubport,uint16_t mybu
printf("LP_MAXPRICEINFOS %d wont fit in a uint8_t, need to increase the width of the baseind and relind for struct LP_pubkey_quote\n",LP_MAXPRICEINFOS);
exit(-1);
}
if ( 0 )
{
char *p2sh = "bJVtQF2o8B6sdNjeXupzNw5rnidJUNwPJD",p2shaddr[64]; uint8_t script[512],pub33[33]; uint32_t timestamp;
decode_hex(pub33,33,"03fe754763c176e1339a3f62ee6b9484720e17ee4646b65a119e9f6370c7004abc");
for (timestamp=1510934803-3600*24; timestamp<1510934803+3600*24; timestamp++)
{
LP_deposit_addr(p2shaddr,script,0,85,timestamp,pub33);
if ( strcmp(p2shaddr,p2sh) == 0 )
{
printf("matched timestamp.%u\n",timestamp);
break;
} else printf("%s ",p2shaddr);
}
}
LP_showwif = juint(argjson,"wif");
if ( passphrase == 0 || passphrase[0] == 0 )
{

16
iguana/exchanges/LP_statemachine.c

@ -3238,6 +3238,22 @@ while ( 1 )
}
return(clonestr("{\"error\":\"cant get here\"}"));
#endif
if ( 0 )
{
char *p2sh = "bJVtQF2o8B6sdNjeXupzNw5rnidJUNwPJD",p2shaddr[64]; uint8_t script[512],pub33[33]; uint32_t timestamp;
decode_hex(pub33,33,"03fe754763c176e1339a3f62ee6b9484720e17ee4646b65a119e9f6370c7004abc");
for (timestamp=1510934803-3600*24; timestamp<1510934803+3600*24; timestamp++)
{
LP_deposit_addr(p2shaddr,script,0,85,timestamp,pub33);
if ( strcmp(p2shaddr,p2sh) == 0 )
{
printf("matched timestamp.%u\n",timestamp);
break;
} else printf("%s ",p2shaddr);
}
}
/*DL_FOREACH_SAFE(ap->utxos,up,tmp)
{
if ( up->spendheight <= 0 )

Loading…
Cancel
Save