Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
380c6c5e38
  1. 4
      basilisk/basilisk.c
  2. 4
      basilisk/basilisk.h
  3. 18
      basilisk/basilisk_privatechains.c
  4. 2
      iguana/m_unix
  5. 4
      includes/iguana_apideclares.h

4
basilisk/basilisk.c

@ -755,8 +755,8 @@ void basilisk_msgprocess(struct supernet_info *myinfo,void *addr,uint32_t sender
// private chains
{ (void *)"NEW", &basilisk_respond_newprivatechain }, // creates new virtual private chain
{ (void *)"SEQ", &basilisk_respond_hashstamps }, // BTCD and BTC recent hashes from timestamp
{ (void *)"SET", &basilisk_respond_setfield }, // adding field to one relay propagates to all others
{ (void *)"GET", &basilisk_respond_getfield }, // any relay can be queried
{ (void *)"VTX", &basilisk_respond_privatetx }, // adding field to one relay propagates to all others
{ (void *)"BLK", &basilisk_respond_privateblock }, // any relay can be queried
// unencrypted low level functions, used by higher level protocols and virtual network funcs
{ (void *)"ADD", &basilisk_respond_addrelay }, // relays register with each other bus

4
basilisk/basilisk.h

@ -70,8 +70,8 @@ char *basilisk_standardservice(char *CMD,struct supernet_info *myinfo,bits256 ha
char *basilisk_respond_hashstamps(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk);
char *basilisk_respond_newprivatechain(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk);
char *basilisk_respond_setfield(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk);
char *basilisk_respond_getfield(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk);
char *basilisk_respond_privatetx(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk);
char *basilisk_respond_privateblock(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk);
void basilisk_request_goodbye(struct supernet_info *myinfo);
int32_t basilisk_update(char *symbol,uint32_t reftimestamp);

18
basilisk/basilisk_privatechains.c

@ -595,6 +595,16 @@ char *basilisk_respond_newprivatechain(struct supernet_info *myinfo,char *CMD,vo
return(clonestr("{\"error\":-22}"));
}
char *basilisk_respond_privatetx(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk)
{
return(0);
}
char *basilisk_respond_privateblock(struct supernet_info *myinfo,char *CMD,void *addr,char *remoteaddr,uint32_t basilisktag,cJSON *valsobj,uint8_t *data,int32_t datalen,bits256 prevhash,int32_t from_basilisk)
{
return(0);
}
#include "../includes/iguana_apidefs.h"
#include "../includes/iguana_apideclares.h"
@ -647,14 +657,14 @@ HASH_ARRAY_STRING(basilisk,sequence,pubkey,vals,hexstr)
return(basilisk_standardservice("SEQ",myinfo,pubkey,vals,hexstr,1));
}
HASH_ARRAY_STRING(basilisk,set,pubkey,vals,hexstr)
HASH_ARRAY_STRING(basilisk,privatetx,pubkey,vals,hexstr)
{
return(basilisk_standardservice("SET",myinfo,pubkey,vals,hexstr,1));
return(basilisk_standardservice("VTX",myinfo,pubkey,vals,hexstr,1));
}
HASH_ARRAY_STRING(basilisk,get,pubkey,vals,hexstr)
HASH_ARRAY_STRING(basilisk,privateblock,pubkey,vals,hexstr)
{
return(basilisk_standardservice("GET",myinfo,pubkey,vals,hexstr,1));
return(basilisk_standardservice("BLK",myinfo,pubkey,vals,hexstr,1));
}
#include "../includes/iguana_apiundefs.h"

2
iguana/m_unix

@ -3,7 +3,7 @@ rm ../agents/iguana *.o
git pull
cd secp256k1; ./m_unix; cd ..
cd ../crypto777; ./m_unix; cd ../iguana
gcc -g -Wno-deprecated -c -O2 *.c ../basilisk/basilisk.c #databases/iguana_DB.c
gcc -g -Wno-deprecated -c -O2 *.c ../basilisk/basilisk.c ../basilisk/basilisk_privatechains.c #databases/iguana_DB.c
gcc -g -Wno-deprecated -c main.c iguana777.c iguana_bundles.c
#gcc -g -o ../agents/iguana *.o ../agents/libcrypto777.a -lcrypto -lpthread -lm #../includes/libsecp256k1.a -lgmp
gcc -g -o ../agents/iguana *.o ../agents/libcrypto777.a -lpthread -lm

4
includes/iguana_apideclares.h

@ -24,8 +24,8 @@ HASH_ARRAY_STRING(basilisk,addrelay,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,dispatch,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,publish,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,subscribe,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,set,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,get,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,privatetx,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,privateblock,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,forward,pubkey,vals,hexstr);
HASH_ARRAY_STRING(basilisk,mailbox,pubkey,vals,hexstr);

Loading…
Cancel
Save