Browse Source

remove nanomsg include

release/v0.1
jl777 9 years ago
parent
commit
903469a820
  1. 4
      iguana/SuperNET.h
  2. 1
      iguana/ramchain_api.c
  3. 6
      iguana/swaps/iguana_BTCswap.c

4
iguana/SuperNET.h

@ -19,7 +19,7 @@
#define SUPERNET_MAXHOPS 7
#include "../crypto777/OS_portable.h"
#include "../includes/cJSON.h"
#include "../crypto777/nanosrc/nn.h"
//#include "../crypto777/nanosrc/nn.h"
#define SUPERNET_GETPEERSTR "{\"agent\":\"SuperNET\",\"method\":\"getpeers\",\"plaintext\":1}"
#define SUPERNET_STOPSTR "{\"agent\":\"SuperNET\",\"method\":\"stop\",\"plaintext\":1}"
@ -83,7 +83,7 @@ struct supernet_info
struct supernet_address myaddr;
int32_t LBsock,PUBsock,reqsock,subsock,networktimeout,maxdelay;
uint16_t LBport,PUBport,reqport,subport;
struct nn_pollfd pfd[SUPERNET_MAXAGENTS]; //struct relay_info active;
//struct nn_pollfd pfd[SUPERNET_MAXAGENTS]; //struct relay_info active;
struct supernet_agent agents[SUPERNET_MAXAGENTS]; queue_t acceptQ;
int32_t numagents,numexchanges;
struct exchange_info *tradingexchanges[SUPERNET_MAXEXCHANGES];

1
iguana/ramchain_api.c

@ -516,3 +516,4 @@ HASH_AND_STRING(ramchain,verifytx,txid,txbytes)
#undef IGUANA_ARGS
#include "../includes/iguana_apiundefs.h"

6
iguana/swaps/iguana_BTCswap.c

@ -424,8 +424,8 @@ struct instantdex_stateinfo *BTC_initFSM(int32_t *n)
// "<TX>found" means the other party's is confirmed at user specified confidence level
// BTC_cleanup state just unwinds pending swap as nothing has been committed yet
// states
s = instantdex_statecreate(s,n,"BTC_cleanup",BOB_processfunc,0,0,0);
// states instantdex_statecreate(s,n,<Name of State>,handlerfunc,errorhandler,<Timeout State>,<Error State>
// a given state has a couple of handlers and custom events, with timeouts and errors invoking a bypass s = instantdex_statecreate(s,n,"BTC_cleanup",BOB_processfunc,0,0,0);
s = instantdex_statecreate(s,n,"BOB_claimdeposit",BOB_processfunc,0,0,0);
s = instantdex_statecreate(s,n,"ALICE_reclaim",BOB_processfunc,0,0,0);
@ -453,7 +453,7 @@ struct instantdex_stateinfo *BTC_initFSM(int32_t *n)
s = instantdex_statecreate(s,n,"ALICE_claimedbtc",BOB_processfunc,0,0,0);
s = instantdex_statecreate(s,n,"BOB_claimedalt",BOB_processfunc,0,0,0);
// events
// events instantdex_addevent(s,*n,<Current State>,<event>,<message to send>,<Next State>)
instantdex_addevent(s,*n,"BOB_sentoffer","BTCchose","BTCprivs","BOB_sentprivs");
instantdex_addevent(s,*n,"BOB_sentprivs","feefound","BTCdeptx","BOB_sentdeposit");
instantdex_addevent(s,*n,"ALICE_sentoffer","BTCchose","BTCprivs","ALICE_sentprivs");

Loading…
Cancel
Save