Browse Source

Merge pull request #131 from jl777/acspeed

Acspeed
master
jl777 8 years ago
committed by GitHub
parent
commit
fcfa9d71d5
  1. 4
      iguana/dPoW.h
  2. 3
      iguana/dpow/dpow_network.c
  3. 3
      iguana/main.c
  4. 1
      includes/iguana_funcs.h

4
iguana/dPoW.h

@ -19,10 +19,10 @@
#define DPOW_FIRSTRATIFY 1000
#define DPOW_CHECKPOINTFREQ 10
#define DPOW_MINSIGS 13 //((height < 90000) ? 7 : 11)
#define DPOW_MINSIGS 17 //((height < 90000) ? 7 : 11)
//#define DPOW_M(bp) ((bp)->minsigs) // (((bp)->numnotaries >> 1) + 1)
#define DPOW_MODIND(bp,offset) (((((bp)->height / DPOW_CHECKPOINTFREQ) % (bp)->numnotaries) + (offset)) % (bp)->numnotaries)
#define DPOW_VERSION 0x0770
#define DPOW_VERSION 0x0771
#define DPOW_UTXOSIZE 10000
#define DPOW_MINOUTPUT 6000
#define DPOW_DURATION 300

3
iguana/dpow/dpow_network.c

@ -81,6 +81,7 @@ void dex_reqsend(struct supernet_info *myinfo,uint8_t *data,int32_t datalen)
nn_setsockopt(myinfo->reqsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
nn_setsockopt(myinfo->subsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
nn_setsockopt(myinfo->subsock,NN_SUB,NN_SUB_SUBSCRIBE,"",0);
printf("DEXINIT req.%d sub.%d\n",myinfo->reqsock,myinfo->subsock);
}
}
}
@ -317,6 +318,7 @@ void dpow_nanomsginit(struct supernet_info *myinfo,char *ipaddr)
nn_setsockopt(myinfo->dpowsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
nn_setsockopt(myinfo->dexsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
nn_setsockopt(myinfo->repsock,NN_SOL_SOCKET,NN_RCVTIMEO,&timeout,sizeof(timeout));
printf("DEXINIT dex.%d rep.%d\n",myinfo->dexsock,myinfo->repsock);
}
}
}
@ -748,6 +750,7 @@ void dpow_nanomsg_update(struct supernet_info *myinfo)
dpow_nanoutxoget(myinfo,dp,bp,&np->notarize,0,np->senderind);
else dpow_nanoutxoget(myinfo,dp,bp,&np->ratify,1,np->senderind);
dpow_datahandler(myinfo,dp,bp,np->senderind,np->channel,np->height,np->packet,np->datalen);
dex_reqsend(myinfo,np->packet,np->datalen);
}
}
//dp->crcs[firstz] = crc32;

3
iguana/main.c

@ -1587,8 +1587,6 @@ void iguana_main(void *arg)
libgfshare_init(myinfo,myinfo->logs,myinfo->exps);
myinfo->rpcport = IGUANA_RPCPORT;
myinfo->dpowsock = myinfo->dexsock = myinfo->pubsock = myinfo->subsock = myinfo->reqsock = myinfo->repsock = -1;
//myinfo->rpcport = IGUANA_NOTARYPORT;
//myinfo->IAMNOTARY = 1;
if ( arg != 0 )
{
if ( strcmp((char *)arg,"OStests") == 0 )
@ -1597,6 +1595,7 @@ void iguana_main(void *arg)
{
myinfo->rpcport = IGUANA_NOTARYPORT;
myinfo->IAMNOTARY = 1;
//dex_init(myinfo);
}
}
#ifdef IGUANA_OSTESTS

1
includes/iguana_funcs.h

@ -259,6 +259,7 @@ struct iguana_waddress *iguana_waccountadd(struct supernet_info *myinfo,struct i
struct iguana_waddress *iguana_waccountswitch(struct supernet_info *myinfo,struct iguana_info *coin,char *account,char *coinaddr,char *redeemScript);
struct iguana_waddress *iguana_waddresscalc(struct supernet_info *myinfo,uint8_t pubval,uint8_t wiftype,struct iguana_waddress *addr,bits256 privkey);
struct iguana_waddress *iguana_waddressfind(struct supernet_info *myinfo,struct iguana_waccount *wacct,char *coinaddr);
void dex_init(struct supernet_info *myinfo);
char *iguana_coinjson(struct iguana_info *coin,char *method,cJSON *json);
cJSON *iguana_peersjson(struct iguana_info *coin,int32_t addronly);
//int32_t btc_priv2wif(char *wifstr,uint8_t privkey[32],uint8_t addrtype);

Loading…
Cancel
Save