From 6770427bae5218b8ea12f870c7f8d7627147e504 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 30 Mar 2016 07:20:49 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 4 ++-- iguana/iguana_recv.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index 7dc241b86..8fe09fb73 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -477,9 +477,9 @@ int32_t iguana_sendhashes(struct iguana_info *coin,struct iguana_peer *addr,int3 int32_t len; uint8_t *serialized = malloc((sizeof(int32_t) + sizeof(*hashes))*n + 1024); if ( (len= iguana_getdata(coin,serialized,MSG_BLOCK,hashes,n)) > 0 ) { - if ( len > sizeof(serialized) ) + if ( len > (sizeof(int32_t) + sizeof(*hashes))*n + 1024 ) { - printf("FATAL ERROR iguana_sendhashes: len.%d size.%ld\n",len,sizeof(serialized)); + printf("FATAL ERROR iguana_sendhashes: len.%d size.%ld\n",len,(sizeof(int32_t) + sizeof(*hashes))*n + 1024); exit(-1); } iguana_send(coin,addr,serialized,len); diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index 4296dceff..25979fcc8 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -826,7 +826,7 @@ struct iguana_bundlereq *iguana_recvblockhashes(struct iguana_info *coin,struct { bp->speculative[i] = blockhashes[i]; //printf("speculate new issue [%d:%d]\n",bp->hdrsi,i); - iguana_blockQ("speculate",coin,bp,-i,blockhashes[i],0); + //iguana_blockQ("speculate",coin,bp,-i,blockhashes[i],0); } bp->speculative[0] = bp->hashes[0]; bp->numspec = num <= bp->n+1 ? num : bp->n+1;