Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
a3a7ca1cea
  1. 2
      iguana/iguana777.h
  2. 7
      iguana/iguana_bundles.c

2
iguana/iguana777.h

@ -42,7 +42,7 @@ typedef int32_t (*blockhashfunc)(uint8_t *blockhashp,uint8_t *serialized,int32_t
#define IGUANA_HEADPERCENTAGE 0. #define IGUANA_HEADPERCENTAGE 0.
#define IGUANA_TAILPERCENTAGE 1.0 #define IGUANA_TAILPERCENTAGE 1.0
#define IGUANA_MAXPENDHDRS 1 #define IGUANA_MAXPENDHDRS 1
#define IGUANA_MAXPENDINGREQUESTS 1 #define IGUANA_MAXPENDINGREQUESTS 512
#define IGUANA_PENDINGREQUESTS 512 #define IGUANA_PENDINGREQUESTS 512
#define IGUANA_MINPENDBUNDLES 2 #define IGUANA_MINPENDBUNDLES 2
#define IGUANA_MAXPENDBUNDLES 64 #define IGUANA_MAXPENDBUNDLES 64

7
iguana/iguana_bundles.c

@ -479,7 +479,7 @@ int32_t iguana_blocksmissing(struct iguana_info *coin,int32_t *nonzp,uint8_t mis
int32_t iguana_sendhashes(struct iguana_info *coin,struct iguana_peer *addr,int32_t msgtype,bits256 hashes[],int32_t n) int32_t iguana_sendhashes(struct iguana_info *coin,struct iguana_peer *addr,int32_t msgtype,bits256 hashes[],int32_t n)
{ {
int32_t len; uint8_t *serialized; int32_t len; uint8_t *serialized;
if ( strcmp("BTC",coin->symbol) != 0 ) if ( 0 && strcmp("BTC",coin->symbol) != 0 )
{ {
serialized = malloc((sizeof(int32_t) + sizeof(*hashes))*n + 1024); serialized = malloc((sizeof(int32_t) + sizeof(*hashes))*n + 1024);
if ( (len= iguana_getdata(coin,serialized,MSG_BLOCK,hashes,n)) > 0 ) if ( (len= iguana_getdata(coin,serialized,MSG_BLOCK,hashes,n)) > 0 )
@ -502,9 +502,8 @@ int32_t iguana_sendhashes(struct iguana_info *coin,struct iguana_peer *addr,int3
int32_t i; int32_t i;
for (i=0; i<n; i++) for (i=0; i<n; i++)
{ {
iguana_sendblockreqPT(coin,addr,0,-1,hashes[i],0); //iguana_sendblockreqPT(coin,addr,0,-1,hashes[i],0);
iguana_blockQ("test",coin,0,-1,hashes[i],0);
//iguana_blockQ("test",coin,0,-1,hashes[i],0);
} }
} }
return(n); return(n);

Loading…
Cancel
Save