Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
d5de209a0c
  1. 9
      iguana/iguana_unspents.c

9
iguana/iguana_unspents.c

@ -330,7 +330,7 @@ uint32_t iguana_sparseaddpk(uint8_t *bits,int32_t width,uint32_t tablesize,uint8
struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,struct iguana_txid *tx,bits256 txid,int16_t *permutation,int32_t numhdrs) struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,struct iguana_txid *tx,bits256 txid,int16_t *permutation,int32_t numhdrs)
{ {
static int64_t ksum,kiters; static int64_t ksum,kiters;
uint8_t *TXbits; struct iguana_txid *T; uint32_t txidind; int32_t i,j,k; int16_t tmp,pendingval; uint8_t *TXbits; struct iguana_txid *T; uint32_t txidind; int32_t i,j,k; int16_t tmp;
struct iguana_bundle *bp; struct iguana_ramchain *ramchain; struct iguana_block *block; struct iguana_bundle *bp; struct iguana_ramchain *ramchain; struct iguana_block *block;
*heightp = -1; *heightp = -1;
if ( numhdrs < 0 ) if ( numhdrs < 0 )
@ -370,7 +370,7 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st
*tx = T[txidind]; *tx = T[txidind];
if ( k != 0 ) if ( k != 0 )
{ {
i = 0; /*i = 0;
j = 1; j = 1;
pendingval = permutation[k]; pendingval = permutation[k];
while ( i < k ) while ( i < k )
@ -380,7 +380,10 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st
pendingval = tmp; pendingval = tmp;
i += j++; i += j++;
} }
permutation[k] = pendingval; permutation[k] = pendingval;*/
tmp = permutation[k-1];
permutation[k-1] = permutation[k];
permutation[k] = tmp;
} }
return(tx); return(tx);
} }

Loading…
Cancel
Save