|
|
@ -1260,7 +1260,7 @@ char *instantdex_statemachine(struct instantdex_stateinfo *states,int32_t numsta |
|
|
|
if ( state->events[i].nextstateind > 1 ) |
|
|
|
{ |
|
|
|
instantdex_newjson(myinfo,swap,newjson); |
|
|
|
printf("i.%d (%s) %s %s.%d -> %s.%d send.(%s) %p\n",i,jprint(newjson,0),cmdstr,swap->state->name,state->ind,states[state->events[i].nextstateind].name,state->events[i].nextstateind,state->events[i].sendcmd,&states[state->events[i].nextstateind]); |
|
|
|
//printf("i.%d (%s) %s %s.%d -> %s.%d send.(%s) %p\n",i,jprint(newjson,0),cmdstr,swap->state->name,state->ind,states[state->events[i].nextstateind].name,state->events[i].nextstateind,state->events[i].sendcmd,&states[state->events[i].nextstateind]);
|
|
|
|
swap->state = &states[state->events[i].nextstateind]; |
|
|
|
return(instantdex_sendcmd(myinfo,&swap->mine.offer,newjson,state->events[i].sendcmd,swap->othertrader,INSTANTDEX_HOPS,serdata,serdatalen,0,swap)); |
|
|
|
} else return(clonestr("{\"error\":\"instantdex_statemachine: illegal state\"}")); |
|
|
|