Browse Source

test

acspeed
jl777 9 years ago
parent
commit
b96f1a51a9
  1. 2
      iguana/dpow/dpow_fsm.c
  2. 2
      iguana/dpow/dpow_network.c
  3. 12
      iguana/iguana777.h

2
iguana/dpow/dpow_fsm.c

@ -391,6 +391,8 @@ void dpow_statemachinestart(void *ptr)
//printf("done utxosync start.%u %u\n",starttime,(uint32_t)time(NULL)); //printf("done utxosync start.%u %u\n",starttime,(uint32_t)time(NULL));
while ( time(NULL) < starttime+bp->duration && src != 0 && dest != 0 && bp->state != 0xffffffff ) while ( time(NULL) < starttime+bp->duration && src != 0 && dest != 0 && bp->state != 0xffffffff )
{ {
if ( bp->isratify == 0 && dp->ratifying != 0 )
break;
sleep(1); sleep(1);
if ( dp->checkpoint.blockhash.height > checkpoint.blockhash.height ) if ( dp->checkpoint.blockhash.height > checkpoint.blockhash.height )
{ {

2
iguana/dpow/dpow_network.c

@ -32,7 +32,7 @@ void dex_packet(struct supernet_info *myinfo,struct dex_nanomsghdr *dexp,int32_t
void dex_reqsend(struct supernet_info *myinfo,uint8_t *data,int32_t datalen) void dex_reqsend(struct supernet_info *myinfo,uint8_t *data,int32_t datalen)
{ {
struct dex_nanomsghdr *dexp; char ipaddr[64]; int32_t i,size,recvbytes,sentbytes = 0; uint32_t crc32,*retptr; struct dex_nanomsghdr *dexp; char ipaddr[64]; int32_t size,recvbytes,sentbytes = 0; uint32_t crc32,*retptr;
crc32 = calc_crc32(0,data,datalen); crc32 = calc_crc32(0,data,datalen);
size = (int32_t)(sizeof(*dexp) + datalen); size = (int32_t)(sizeof(*dexp) + datalen);
dexp = calloc(1,size); // endian dependent! dexp = calloc(1,size); // endian dependent!

12
iguana/iguana777.h

@ -47,12 +47,12 @@
#include "nn.h" #include "nn.h"
#include "bus.h" #include "bus.h"
#else*/ #else*/
#if ISNOTARYNODE //#if ISNOTARYNODE
#include <nanomsg/nn.h> #include "../crypto777/nanosrc/nn.h"
#include <nanomsg/bus.h> #include "../crypto777/nanosrc/bus.h"
#include <nanomsg/pubsub.h> #include "../crypto777/nanosrc/pubsub.h"
#include <nanomsg/reqrep.h> #include "../crypto777/nanosrc/reqrep.h"
#endif //#endif
//#endif //#endif
struct supernet_info; struct supernet_info;

Loading…
Cancel
Save