Browse Source

Test

etomic
jl777 7 years ago
parent
commit
06ce0353b0
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_ordermatch.c
  3. 4
      iguana/exchanges/LP_transaction.c
  4. 2
      iguana/exchanges/LP_zeroconf.c

2
iguana/exchanges/LP_nativeDEX.c

@ -27,7 +27,7 @@
// waiting for alice and alice disconnects // waiting for alice and alice disconnects
// MNZ getcoin strangeness // MNZ getcoin strangeness
// portfolio value based on ask? // portfolio value based on ask?
// listunspent triplicate // listunspent triplicate, tradebot timeslice?
// disable basilisk // disable basilisk
// verify encrypted destpubkey, broadcast:0 setprice // verify encrypted destpubkey, broadcast:0 setprice

2
iguana/exchanges/LP_ordermatch.c

@ -1150,7 +1150,7 @@ char *LP_autobuy(void *ctx,char *myipaddr,int32_t mypubsock,char *base,char *rel
memset(pubkeys,0,sizeof(pubkeys)); memset(pubkeys,0,sizeof(pubkeys));
LP_txfees(&txfee,&desttxfee,base,rel); LP_txfees(&txfee,&desttxfee,base,rel);
destsatoshis = SATOSHIDEN * relvolume; destsatoshis = SATOSHIDEN * relvolume;
LP_address_utxo_reset(relcoin); //LP_address_utxo_reset(relcoin);
if ( (autxo= LP_utxo_bestfit(rel,destsatoshis + 2*desttxfee)) == 0 ) if ( (autxo= LP_utxo_bestfit(rel,destsatoshis + 2*desttxfee)) == 0 )
return(clonestr("{\"error\":\"cant find alice utxo that is close enough in size\"}")); return(clonestr("{\"error\":\"cant find alice utxo that is close enough in size\"}"));
//printf("bestfit selected alice (%.8f %.8f) for %.8f sats %.8f\n",dstr(autxo->payment.value),dstr(autxo->fee.value),dstr(destsatoshis),dstr(autxo->S.satoshis)); //printf("bestfit selected alice (%.8f %.8f) for %.8f sats %.8f\n",dstr(autxo->payment.value),dstr(autxo->fee.value),dstr(destsatoshis),dstr(autxo->S.satoshis));

4
iguana/exchanges/LP_transaction.c

@ -604,12 +604,12 @@ int32_t iguana_signrawtransaction(void *ctx,char *symbol,uint8_t wiftaddr,uint8_
sighash = LP_sighash(symbol,zcash); sighash = LP_sighash(symbol,zcash);
if ( (complete= bitcoin_verifyvins(ctx,symbol,taddr,pubtype,p2shtype,isPoS,height,signedtxidp,&signedtx,msgtx,serialized3,maxsize,V,sighash,1,V->suppress_pubkeys,zcash)) > 0 && signedtx != 0 ) if ( (complete= bitcoin_verifyvins(ctx,symbol,taddr,pubtype,p2shtype,isPoS,height,signedtxidp,&signedtx,msgtx,serialized3,maxsize,V,sighash,1,V->suppress_pubkeys,zcash)) > 0 && signedtx != 0 )
{ {
/*int32_t tmp; //char str[65]; int32_t tmp; //char str[65];
if ( (tmp= iguana_interpreter(ctx,cJSON_CreateArray(),iguana_lockval(finalized,jint(txobj,"locktime")),V,numinputs)) < 0 ) if ( (tmp= iguana_interpreter(ctx,cJSON_CreateArray(),iguana_lockval(finalized,jint(txobj,"locktime")),V,numinputs)) < 0 )
{ {
printf("iguana_interpreter %d error.(%s)\n",tmp,signedtx); printf("iguana_interpreter %d error.(%s)\n",tmp,signedtx);
complete = 0; complete = 0;
} else printf("interpreter passed\n");*/ } else printf("interpreter passed\n");
} else printf("complete.%d\n",complete); } else printf("complete.%d\n",complete);
} else printf("rwmsgtx error\n"); } else printf("rwmsgtx error\n");
} else printf("no inputs in vins.(%s)\n",vins!=0?jprint(vins,0):"null"); } else printf("no inputs in vins.(%s)\n",vins!=0?jprint(vins,0):"null");

2
iguana/exchanges/LP_zeroconf.c

@ -154,7 +154,7 @@ char *LP_zeroconf_claim(struct iguana_info *coin,char *depositaddr,uint32_t expi
{ {
item = jitem(array,i); item = jitem(array,i);
satoshis = LP_listunspent_parseitem(coin,&utxotxid,&utxovout,&height,item); satoshis = LP_listunspent_parseitem(coin,&utxotxid,&utxovout,&height,item);
if ( (signedtx= basilisk_swap_bobtxspend(&signedtxid,0,"zeroconfclaim",coin->symbol,coin->wiftaddr,coin->taddr,coin->pubtype,coin->p2shtype,coin->isPoS,coin->wiftype,ctx,G.LP_privkey,0,redeemscript,redeemlen,userdata,userdatalen,utxotxid,utxovout,coin->smartaddr,G.LP_pubsecp,timestamp,0,&destamount,satoshis-coin->txfee,coin->smartaddr,vinaddr,1,coin->zcash)) != 0 ) if ( (signedtx= basilisk_swap_bobtxspend(&signedtxid,0,"zeroconfclaim",coin->symbol,coin->wiftaddr,coin->taddr,coin->pubtype,coin->p2shtype,coin->isPoS,coin->wiftype,ctx,G.LP_privkey,0,redeemscript,redeemlen,userdata,userdatalen,utxotxid,utxovout,coin->smartaddr,G.LP_pubsecp,timestamp,0,&destamount,satoshis-10000,coin->smartaddr,vinaddr,1,coin->zcash)) != 0 )
{ {
printf("signedtx.(%s)\n",signedtx); printf("signedtx.(%s)\n",signedtx);
sendtxid = LP_broadcast("claim","KMD",signedtx,signedtxid); sendtxid = LP_broadcast("claim","KMD",signedtx,signedtxid);

Loading…
Cancel
Save