Browse Source

Pub33-> pub64

etomic
jl777 7 years ago
parent
commit
84329750a1
  1. 12
      iguana/exchanges/LP_etomic.c
  2. 7
      iguana/exchanges/LP_swap.c
  3. 1
      iguana/exchanges/enable

12
iguana/exchanges/LP_etomic.c

@ -72,27 +72,27 @@ int32_t LP_etomic_priv2addr(char *coinaddr,bits256 privkey)
return(-1);
}
int32_t LP_etomic_priv2pub(uint8_t *pub33,bits256 privkey)
int32_t LP_etomic_priv2pub(uint8_t *pub64,bits256 privkey)
{
char *pubstr,str[72]; int32_t retval = -1;
bits256_str(str,privkey);
if ( (pubstr= getPubKeyFromPriv(str)) != 0 )
{
if ( strlen(pubstr) == 35 && pubstr[0] == '0' && pubstr[1] == 'x' )
if ( strlen(pubstr) == 128 && pubstr[0] == '0' && pubstr[1] == 'x' )
{
decode_hex(pub33,33,pubstr+2);
retval = 33;
decode_hex(pub33,64,pubstr+2);
retval = 64;
}
free(pubstr);
}
return(retval);
}
int32_t LP_etomic_pub2addr(char *coinaddr,uint8_t pub33[33])
int32_t LP_etomic_pub2addr(char *coinaddr,uint8_t pub64[64])
{
char pubkeystr[72],*addrstr;
strcpy(pubkeystr,"0x");
init_hexbytes_noT(pubkeystr+2,pub33,33);
init_hexbytes_noT(pubkeystr+2,pub64,64);
if ( (addrstr= pubKey2Addr(pubkeystr+2)) != 0 )
{
strcpy(coinaddr,addrstr);

7
iguana/exchanges/LP_swap.c

@ -1165,8 +1165,11 @@ struct basilisk_swap *bitcoin_swapinit(bits256 privkey,uint8_t *pubkey33,bits256
swap->I.bobconfirms = swap->I.bobmaxconfirms;
if ( swap->I.aliceconfirms > swap->I.alicemaxconfirms )
swap->I.aliceconfirms = swap->I.alicemaxconfirms;
swap->I.bobconfirms *= !swap->I.bobistrusted;
swap->I.aliceconfirms *= !swap->I.aliceistrusted;
if ( strcmp("BAY",swap->I.req.src) != 0 && strcmp("BAY",swap->I.req.dest) != 0 )
{
swap->I.bobconfirms *= !swap->I.bobistrusted;
swap->I.aliceconfirms *= !swap->I.aliceistrusted;
}
printf(">>>>>>>>>> jumblrflag.%d <<<<<<<<< r.%u q.%u, %.8f bobconfs.%d, %.8f aliceconfs.%d taddr.%d %d\n",jumblrflag,swap->I.req.requestid,swap->I.req.quoteid,dstr(swap->I.bobsatoshis),swap->I.bobconfirms,dstr(swap->I.alicesatoshis),swap->I.aliceconfirms,bobcoin->taddr,alicecoin->taddr);
if ( swap->I.iambob != 0 )
{

1
iguana/exchanges/enable

@ -1,6 +1,7 @@
#!/bin/bash
source userpass
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"BEER\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"ETOMIC\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"PIZZA\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"REVS\"}"
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"enable\",\"coin\":\"KMD\"}"

Loading…
Cancel
Save