Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
8a18640bf2
  1. 2
      basilisk/basilisk.c
  2. 4
      basilisk/basilisk_CMD.c
  3. 8
      iguana/iguana_msg.c
  4. 2
      includes/iguana_funcs.h

2
basilisk/basilisk.c

@ -586,7 +586,7 @@ void basilisk_msgprocess(struct supernet_info *myinfo,void *_addr,uint32_t sende
// unencrypted low level functions, used by higher level protocols and virtual network funcs
{ (void *)"ADD", &basilisk_respond_addrelay }, // relays register with each other bus
{ (void *)"RLY", &basilisk_respond_relays },
//{ (void *)"RLY", &basilisk_respond_relays },
{ (void *)"DEX", &basilisk_respond_instantdex },
// encrypted data for jumblr

4
basilisk/basilisk_CMD.c

@ -78,7 +78,7 @@ char *basilisk_addrelay_info(struct supernet_info *myinfo,uint8_t *pubkey33,uint
return(clonestr("{\"result\":\"relay added\"}"));
}
char *basilisk_respond_relays(struct supernet_info *myinfo,char *CMD,void *_addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 hash,int32_t from_basilisk)
/*char *basilisk_respond_relays(struct supernet_info *myinfo,char *CMD,void *_addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 hash,int32_t from_basilisk)
{
bits256 txhash2; uint32_t ipbits; int32_t i,n,len,siglen; uint8_t pubkey33[65],sig[128]; char *sigstr = 0,*retstr,pubstr[128];
if ( (sigstr= jstr(valsobj,"sig")) != 0 )
@ -135,7 +135,7 @@ int32_t basilisk_relays_send(struct supernet_info *myinfo,struct iguana_peer *ad
} else return(-1);
}
/*char *basilisk_respond_relays(struct supernet_info *myinfo,char *CMD,void *_addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 hash,int32_t from_basilisk)
char *basilisk_respond_relays(struct supernet_info *myinfo,char *CMD,void *_addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 hash,int32_t from_basilisk)
{
uint32_t *ipbits = (uint32_t *)data; int32_t num,i,j,n = datalen >> 2;
for (i=num=0; i<n; i++)

8
iguana/iguana_msg.c

@ -385,8 +385,8 @@ void iguana_supernet_ping(struct supernet_info *myinfo,struct iguana_info *coin,
{
if ( addr->supernet != 0 || addr->basilisk != 0 )
{
if ( coin->RELAYNODE != 0 )
basilisk_relays_send(myinfo,addr);
//if ( coin->RELAYNODE != 0 )
// basilisk_relays_send(myinfo,addr);
//printf("send getpeers to %s\n",addr->ipaddr);
//printf("maybe send basilisk ping here?\n");
//iguana_send_supernet(addr,SUPERNET_GETPEERSTR,0);
@ -448,8 +448,8 @@ int32_t iguana_send_ping(struct supernet_info *myinfo,struct iguana_info *coin,s
iguana_queue_send(addr,0,serialized,"getaddr",0);
len = iguana_rwnum(1,&serialized[sizeof(struct iguana_msghdr)],sizeof(uint64_t),&nonce);
iguana_supernet_ping(myinfo,coin,addr);
if ( myinfo->IAMRELAY != 0 )
basilisk_relays_send(myinfo,addr);
//if ( myinfo->IAMRELAY != 0 )
// basilisk_relays_send(myinfo,addr);
return(iguana_queue_send(addr,0,serialized,"ping",len));
}

2
includes/iguana_funcs.h

@ -520,7 +520,7 @@ struct gecko_memtx *gecko_unspentfind(struct gecko_memtx ***ptrpp,struct iguana_
int64_t *gecko_valueptr(struct gecko_memtx *memtx,int32_t vout);
struct iguana_peer *iguana_peerfindipaddr(struct iguana_info *coin,char *ipaddr,int32_t needalive);
struct iguana_peer *iguana_peerfindipbits(struct iguana_info *coin,uint32_t ipbits,int32_t needalive);
int32_t basilisk_relays_send(struct supernet_info *myinfo,struct iguana_peer *addr);
//int32_t basilisk_relays_send(struct supernet_info *myinfo,struct iguana_peer *addr);
int32_t basilisk_hashes_send(struct supernet_info *myinfo,struct iguana_info *virt,struct iguana_peer *addr,char *CMD,bits256 *txids,int32_t num);
int32_t iguana_opreturn(struct supernet_info *myinfo,int32_t ordered,struct iguana_info *coin,uint32_t timestamp,struct iguana_bundle *bp,int64_t crypto777_payment,int32_t height,uint64_t hdrsi_unspentind,int64_t payment,uint32_t fileid,uint64_t scriptpos,uint32_t scriptlen);
int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,long fileptr[2],char *fname,uint64_t scriptpos,int32_t scriptlen);

Loading…
Cancel
Save