Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
87fa97033b
  1. 4
      iguana/swaps/iguana_BTCswap.c

4
iguana/swaps/iguana_BTCswap.c

@ -1013,7 +1013,7 @@ struct instantdex_stateinfo *BTC_initFSM(int32_t *n)
s = instantdex_statecreate(s,n,"ALICE_waitdeposit",ALICE_waitdepositfunc,0,"BTC_cleanup",0,0);
instantdex_addevent(s,*n,"ALICE_waitdeposit","depfound","BTCalttx","ALICE_sentalt");
instantdex_addevent(s,*n,"ALICE_waitdeposit","feefound","poll","ALICE_waitdeposit");
instantdex_addevent(s,*n,"ALICE_waitdeposit","poll","poll","ALICE_waitdeposit");
instantdex_addevent(s,*n,"ALICE_waitdeposit","poll","BTCprivs","ALICE_waitdeposit");
// [BLOCKING: BTCalttx and altfound] now Bob's turn to make sure altpayment is confirmed and send real payment
s = instantdex_statecreate(s,n,"BOB_sentdeposit",BOB_waitBTCalttxfunc,0,"BOB_reclaimed",0,0);
@ -1150,7 +1150,7 @@ char *instantdex_statemachine(struct instantdex_stateinfo *states,int32_t numsta
//printf("i.%d send.%s, next state.%s.[%d] %p\n",i,state->events[i].sendcmd,states[state->events[i].nextstateind].name,state->events[i].nextstateind,&states[state->events[i].nextstateind]);
if ( state->events[i].nextstateind > 1 )
{
if ( jobj(newjson,"feetx") == 0 ) //(swap->otherhavestate & INSTANTDEX_ORDERSTATE_HAVEOTHERFEE) == 0 && swap->myfee != 0 &&
if ( swap->myfee != 0 && jobj(newjson,"feetx") == 0 ) //(swap->otherhavestate & INSTANTDEX_ORDERSTATE_HAVEOTHERFEE) == 0 &&
{
jaddbits256(newjson,"feetxid",swap->myfee->txid);
jaddstr(newjson,"feetx",swap->myfee->txbytes);

Loading…
Cancel
Save