Browse Source

test

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

4
iguana/iguana_instantdex.c

@ -1285,7 +1285,7 @@ char *instantdex_gotoffer(struct supernet_info *myinfo,struct exchange_info *exc
return(retstr);
}
struct bitcoin_eventitem *instantdex_event(char *cmdstr,cJSON *newjson,cJSON *argjson,uint8_t *serdata,int32_t serdatalen)
struct bitcoin_eventitem *instantdex_event(char *cmdstr,cJSON *argjson,cJSON *newjson,uint8_t *serdata,int32_t serdatalen)
{
struct bitcoin_eventitem *ptr;
ptr = calloc(1,sizeof(*ptr) + serdatalen);
@ -1332,7 +1332,7 @@ char *instantdex_parse(struct supernet_info *myinfo,struct instantdex_msghdr *ms
free_json(newjson);
return(retstr);
}
if ( (ptr= instantdex_event(cmdstr,newjson,argjson,serdata,serdatalen)) != 0 )
if ( (ptr= instantdex_event(cmdstr,argjson,newjson,serdata,serdatalen)) != 0 )
queue_enqueue("eventQ",&swap->eventsQ,&ptr->DL,0);
free_json(newjson);
return(clonestr("{\"result\":\"updated statemachine\"}"));

2
iguana/swaps/iguana_BTCswap.c

@ -1055,7 +1055,7 @@ char *instantdex_statemachine(struct instantdex_stateinfo *states,int32_t numsta
swap->state = &states[state->events[i].nextstateind];
if ( swap->pollevent != 0 )
instantdex_eventfree(swap->pollevent);
swap->pollevent = instantdex_event("poll",newjson,argjson,serdata,serdatalen);
swap->pollevent = instantdex_event("poll",argjson,newjson,serdata,serdatalen);
return(instantdex_sendcmd(myinfo,&swap->mine.offer,newjson,state->events[i].sendcmd,swap->othertrader,INSTANTDEX_HOPS,serdata,serdatalen,0));
} else return(clonestr("{\"error\":\"instantdex_statemachine: illegal state\"}"));
} else return(clonestr("{\"result\":\"instantdex_statemachine: processed\"}"));

Loading…
Cancel
Save