From 380c6c5e388de054a7af61599936e13f5549bae3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 5 Jun 2016 17:11:33 -0300 Subject: [PATCH] test --- basilisk/basilisk.c | 4 ++-- basilisk/basilisk.h | 4 ++-- basilisk/basilisk_privatechains.c | 18 ++++++++++++++---- iguana/m_unix | 2 +- includes/iguana_apideclares.h | 4 ++-- 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/basilisk/basilisk.c b/basilisk/basilisk.c index 68f57d60b..de088c43c 100755 --- a/basilisk/basilisk.c +++ b/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 diff --git a/basilisk/basilisk.h b/basilisk/basilisk.h index eb899e4b8..11f3917b2 100755 --- a/basilisk/basilisk.h +++ b/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); diff --git a/basilisk/basilisk_privatechains.c b/basilisk/basilisk_privatechains.c index 0a44924d3..019cd8ea5 100755 --- a/basilisk/basilisk_privatechains.c +++ b/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" diff --git a/iguana/m_unix b/iguana/m_unix index 5d8c27cf8..618cc655f 100755 --- a/iguana/m_unix +++ b/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 diff --git a/includes/iguana_apideclares.h b/includes/iguana_apideclares.h index 7c64b105c..f640d2c30 100755 --- a/includes/iguana_apideclares.h +++ b/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);