Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
f41790b6ea
  1. 6
      crypto777/iguana_utils.c
  2. 2
      iguana/SuperNET.c
  3. 5
      iguana/iguana_msg.c

6
crypto777/iguana_utils.c

@ -859,6 +859,10 @@ void calc_NXTaddr(char *hexstr,uint8_t *buf,uint8_t *msg,int32_t len)
void calc_curve25519_str(char *hexstr,uint8_t *buf,uint8_t *msg,int32_t len)
{
bits256 x = curve25519(*(bits256 *)msg,curve25519_basepoint9());
bits256 x,priv,pub;
if ( len != sizeof(bits256)*2 || is_hexstr((char *)msg,64) == 0 )
conv_NXTpassword(priv.bytes,pub.bytes,msg,len);
else priv = *(bits256 *)msg;
x = curve25519(priv,curve25519_basepoint9());
init_hexbytes_noT(hexstr,x.bytes,sizeof(x));
}

2
iguana/SuperNET.c

@ -976,6 +976,6 @@ THREE_STRINGS(SuperNET,announce,category,subcategory,message)
THREE_STRINGS(SuperNET,survey,category,subcategory,message)
{
return(clonestr("{\"result\":\"layer encrypt here\"}"));
return(clonestr("{\"result\":\"survey here\"}"));
}
#include "../includes/iguana_apiundefs.h"

5
iguana/iguana_msg.c

@ -163,7 +163,7 @@ int32_t iguana_send_version(struct iguana_info *coin,struct iguana_peer *addr,ui
void iguana_gotverack(struct iguana_info *coin,struct iguana_peer *addr)
{
uint8_t serialized[sizeof(struct iguana_msghdr)];
uint8_t serialized[sizeof(struct iguana_msghdr)]; int32_t i;
if ( addr != 0 )
{
printf("gotverack from %s\n",addr->ipaddr);
@ -172,7 +172,8 @@ void iguana_gotverack(struct iguana_info *coin,struct iguana_peer *addr)
if ( addr->supernet != 0 )
{
printf("send getpeers to %s\n",addr->ipaddr);
iguana_send_supernet(coin,addr,SUPERNET_GETPEERSTR,0);
for (i=0; i<4; i++)
iguana_send_supernet(coin,addr,SUPERNET_GETPEERSTR,0);
}
}
}

Loading…
Cancel
Save