From ef413bafb43f56dbfeeeee4fbebf03b8f5f95a7e Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 20 Jan 2016 02:20:21 -0300 Subject: [PATCH] test --- iguana/SuperNET.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/iguana/SuperNET.c b/iguana/SuperNET.c index b299dcc1a..7a086e2ec 100644 --- a/iguana/SuperNET.c +++ b/iguana/SuperNET.c @@ -317,7 +317,7 @@ int32_t iguana_send_supernet(struct iguana_info *coin,struct iguana_peer *addr,c serialized = malloc(sizeof(struct iguana_msghdr) + IGUANA_MAXPACKETSIZE); if ( addr->validpub > 3 && addr->othervalid > 3 ) { - privkey = myinfo->privkey; + memset(privkey.bytes,0,sizeof(privkey));// = myinfo->privkey; destpub = addr->pubkey; } else privkey = GENESIS_PRIVKEY, destpub = GENESIS_PUBKEY; if ( (datalen= SuperNET_json2bits(myinfo->ipaddr,myinfo->privkey,myinfo->myaddr.pubkey,&serialized[sizeof(struct iguana_msghdr)],IGUANA_MAXPACKETSIZE,addr->ipaddr,json,addr->pubkey,addr->validpub)) > 0 ) @@ -327,14 +327,14 @@ int32_t iguana_send_supernet(struct iguana_info *coin,struct iguana_peer *addr,c qlen = iguana_queue_send(coin,addr,delaymillis,serialized,"SuperNET",datalen,0,0); else { - int32_t i; for (i=0; ivalidpub > 3 && addr->othervalid > 3 ) { - privkey = myinfo->privkey; + privkey = GENESIS_PRIVKEY;//myinfo->privkey; senderpub = addr->pubkey; } else privkey = GENESIS_PRIVKEY, senderpub = GENESIS_PUBKEY; if ( (msgbits= SuperNET_deciphercalc(&ptr,&msglen,privkey,senderpub,data,datalen,space,sizeof(space))) == 0 ) @@ -549,9 +549,9 @@ char *SuperNET_p2p(struct iguana_info *coin,struct iguana_peer *addr,int32_t *de printf("couldnt decrypt\n"); return(clonestr("{\"error\":\"couldnt decrypt p2p packet\"}")); } - for (i=0; i