Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
6f6e798a91
  1. 9
      iguana/iguana_instantdex.c
  2. 4
      iguana/swaps/iguana_BTCswap.c

9
iguana/iguana_instantdex.c

@ -415,10 +415,11 @@ char *instantdex_sendcmd(struct supernet_info *myinfo,struct instantdex_offer *o
nxt64bits = acct777_nxt64bits(myinfo->myaddr.persistent);
reqstr = jprint(argjson,0);
slen = (int32_t)(strlen(reqstr) + 1);
extraser = (void *)swap->deck;
extralen = (int32_t)sizeof(swap->deck);
if ( swap->otherchoosei < 0 )
{
extraser = (void *)swap->deck;
extralen = (int32_t)sizeof(swap->deck);
}
datalen = (int32_t)slen + extralen + olen;
msg = calloc(1,datalen + sizeof(*msg) + sizeof(swap->deck));
for (i=0; i<sizeof(msg->cmd); i++)

4
iguana/swaps/iguana_BTCswap.c

@ -589,8 +589,8 @@ void instantdex_swapbits256update(bits256 *txidp,cJSON *argjson,char *fieldname)
void instantdex_newjson(struct supernet_info *myinfo,struct bitcoin_swapinfo *swap,cJSON *newjson)
{
uint8_t pubkey[33]; int32_t deckflag = 1;
//deckflag = (newjson != 0 && swap->otherchoosei < 0) ? 1 : 0;
uint8_t pubkey[33]; int32_t deckflag;
deckflag = (newjson != 0 && swap->otherchoosei < 0) ? 1 : 0;
if ( instantdex_pubkeyargs(myinfo,swap,2 + deckflag*INSTANTDEX_DECKSIZE,myinfo->persistent_priv,swap->myorderhash,0x02+instantdex_isbob(swap)) != 2 + deckflag*INSTANTDEX_DECKSIZE )
printf("ERROR: couldnt generate pubkeys deckflag.%d\n",deckflag);
jaddnum(newjson,"have",swap->havestate);

Loading…
Cancel
Save