From 8e7c9f1e6d279c8a59f22e137c5a899caf670718 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 2 Apr 2016 10:44:28 -0600 Subject: [PATCH] test --- iguana/iguana_recv.c | 2 +- iguana/iguana_unspents.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/iguana/iguana_recv.c b/iguana/iguana_recv.c index f7489a99b..c19143d3f 100755 --- a/iguana/iguana_recv.c +++ b/iguana/iguana_recv.c @@ -643,7 +643,7 @@ struct iguana_bundle *iguana_bundleset(struct iguana_info *coin,struct iguana_bl iguana_bundlehash2add(coin,0,bp,bundlei,hash2); if ( iguana_ramchainfile(coin,0,&blockR,bp,bundlei,block) == 0 ) { - block->RO.recvlen = (uint32_t)blockR.H.data->allocsize; + block->RO.recvlen = sizeof(blockR); iguana_ramchain_free(coin,&blockR,1); block->fpipbits = 1; block->txvalid = 1; diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index f04b82e9d..8ff8d12e0 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -752,6 +752,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp) char str[65]; printf("unexpected spendbp: height.%d bp.[%d] U%d <- S%d.[%d] [ext.%d %s prev.%d]\n",bp->bundleheight+i,spentbp->hdrsi,spent_unspentind,spendind,bp->hdrsi,s->external,bits256_str(str,prevhash),s->prevout); errs++; + break; } /*if ( coin->PREFETCHLAG != 0 && now >= spentbp->lastprefetch+coin->PREFETCHLAG ) { @@ -778,6 +779,7 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp) { printf("spendvectors: null unspentind for spendind.%d hdrsi.%d [%d]\n",spendind,spentbp->hdrsi,bp->hdrsi); errs++; + break; } } else @@ -787,6 +789,12 @@ int32_t iguana_spendvectors(struct iguana_info *coin,struct iguana_bundle *bp) break; } } + else + { + errs++; + printf("spendvectors: error resolving external spendind.%d hdrsi.%d\n",spendind,bp->hdrsi); + break; + } } } }