@ -344,17 +344,19 @@ void iguana_parseline(struct iguana_info *coin,int32_t iter,FILE *fp)
vupdate_sha256 ( balancehash . bytes , & vstate , 0 , 0 ) ;
for ( i = 0 ; i < coin - > balanceswritten ; i + + )
{
numpkinds = numunspents = 0 ;
Aptr = 0 , Uptr = 0 ;
if ( ( bp = coin - > bundles [ i ] ) ! = 0 & & bp - > ramchain . H . data ! = 0 & & ( numpkinds = bp - > ramchain . H . data - > numpkinds ) > 0 & & ( numunspents = bp - > ramchain . H . data - > numunspents ) > 0 & & ( Aptr = bp - > ramchain . A ) ! = 0 & & ( Uptr = bp - > ramchain . Uextras ) ! = 0 )
{
vupdate_sha256 ( balancehash . bytes , & vstate , ( void * ) Aptr , sizeof ( * Aptr ) * numpkinds ) ;
vupdate_sha256 ( balancehash . bytes , & vstate , ( void * ) Uptr , sizeof ( * Uptr ) * numunspents ) ;
} else printf ( " missing hdrs.[%d] \n " , i ) ;
} else printf ( " missing hdrs.[%d] data.%p num.(%u %d) %p %p \n " , i , bp - > ramchain . H . data , numpkinds , numunspents , Aptr , Uptr ) ;
}
char str [ 65 ] , str2 [ 65 ] ; printf ( " written.%d balancehash.(%s) vs (%s) \n " , coin - > balanceswritten , bits256_str ( str , balancehash ) , bits256_str ( str2 , coin - > balancehash ) ) ;
if ( memcmp ( balancehash . bytes , coin - > balancehash . bytes , sizeof ( balancehash ) ) ! = 0 )
{
printf ( " balancehash mismatch \n " ) ;
//iguana_truncatebalances(coin);
iguana_truncatebalances ( coin ) ;
} else printf ( " MATCHED balancehash numhdrsi.%d \n " , coin - > balanceswritten ) ;
}
}