Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
0c5e24ab79
  1. 2
      iguana/iguana_instantdex.c
  2. 4
      iguana/iguana_msg.c

2
iguana/iguana_instantdex.c

@ -320,7 +320,7 @@ bits256 instantdex_rwoffer(int32_t rwflag,int32_t *lenp,uint8_t *serialized,stru
char *instantdex_sendcmd(struct supernet_info *myinfo,struct instantdex_offer *offer,cJSON *argjson,char *cmdstr,bits256 desthash,int32_t hops,void *extraser,int32_t extralen)
{
char *reqstr,*retstr; struct instantdex_msghdr *msg; bits256 orderhash; struct iguana_info *coin; struct iguana_peer *addr; int32_t i,j,r,olen,slen,datalen,max; uint8_t serialized[sizeof(*offer) + sizeof(struct iguana_msghdr) + 4096]; uint64_t nxt64bits;
char *reqstr; struct instantdex_msghdr *msg; bits256 orderhash; struct iguana_info *coin; struct iguana_peer *addr; int32_t i,j,r,olen,slen,datalen,max; uint8_t serialized[sizeof(*offer) + sizeof(struct iguana_msghdr) + 4096]; uint64_t nxt64bits;
category_subscribe(myinfo,myinfo->instantdex_category,GENESIS_PUBKEY);
jaddstr(argjson,"cmd",cmdstr);
jaddstr(argjson,"agent","SuperNET");

4
iguana/iguana_msg.c

@ -599,9 +599,9 @@ int32_t iguana_msgparser(struct iguana_info *coin,struct iguana_peer *addr,struc
}
else if ( strcmp(H->command,"InstantDEX") == 0 )
{
init_hexbytes_noT(addr->TXDATA.ptr,data,recvlen);
init_hexbytes_noT((char *)serialized,data,recvlen);
printf("peer InstantDEX message datalen.%d\n",recvlen);
SuperNET_hexmsgadd(myinfo,myinfo->instantdex_category,GENESIS_PUBKEY,addr->TXDATA.ptr,tai_now(),addr->ipaddr);
SuperNET_hexmsgadd(myinfo,myinfo->instantdex_category,GENESIS_PUBKEY,(char *)serialized,tai_now(),addr->ipaddr);
return(0);
}
else if ( strcmp(H->command,"pangea") == 0 )

Loading…
Cancel
Save