|
|
@ -211,17 +211,21 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st |
|
|
|
{ |
|
|
|
TXbits = (void *)(long)((long)ramchain->H.data + ramchain->H.data->TXoffset); |
|
|
|
T = (void *)(long)((long)ramchain->H.data + ramchain->H.data->Toffset); |
|
|
|
//printf("search bp.%p TXbits.%p T.%p %d %d\n",bp,TXbits,T,(int32_t)ramchain->H.data->TXoffset,(int32_t)ramchain->H.data->Toffset);
|
|
|
|
printf("search bp.%p TXbits.%p T.%p %d %d\n",bp,TXbits,T,(int32_t)ramchain->H.data->TXoffset,(int32_t)ramchain->H.data->Toffset); |
|
|
|
if ( (txidind= iguana_sparseaddtx(TXbits,ramchain->H.data->txsparsebits,ramchain->H.data->numtxsparse,txid,T,0)) > 0 ) |
|
|
|
{ |
|
|
|
//printf("found txidind.%d\n",txidind);
|
|
|
|
printf("found txidind.%d\n",txidind); |
|
|
|
for (j=0; j<bp->n; j++) |
|
|
|
if ( (block= bp->blocks[j]) != 0 && txidind >= block->RO.firsttxidind && txidind < block->RO.firsttxidind+block->RO.txn_count ) |
|
|
|
break; |
|
|
|
*heightp = bp->bundleheight + j; |
|
|
|
//printf("found height.%d\n",*heightp);
|
|
|
|
*tx = T[txidind]; |
|
|
|
return(tx); |
|
|
|
if ( j < bp->n ) |
|
|
|
{ |
|
|
|
*heightp = bp->bundleheight + j; |
|
|
|
printf("found height.%d\n",*heightp); |
|
|
|
*tx = T[txidind]; |
|
|
|
return(tx); |
|
|
|
} |
|
|
|
printf("didnt find expected txidind.%d\n",txidind); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|