From d5de209a0c6a8fcf2a46cedd87fbfa64b45bafdd Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 27 Mar 2016 21:05:04 -0300 Subject: [PATCH] test --- iguana/iguana_unspents.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 45c7f4466..cc98c166a 100755 --- a/iguana/iguana_unspents.c +++ b/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) { 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; *heightp = -1; if ( numhdrs < 0 ) @@ -370,7 +370,7 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st *tx = T[txidind]; if ( k != 0 ) { - i = 0; + /*i = 0; j = 1; pendingval = permutation[k]; while ( i < k ) @@ -380,7 +380,10 @@ struct iguana_txid *iguana_txidfind(struct iguana_info *coin,int32_t *heightp,st pendingval = tmp; i += j++; } - permutation[k] = pendingval; + permutation[k] = pendingval;*/ + tmp = permutation[k-1]; + permutation[k-1] = permutation[k]; + permutation[k] = tmp; } return(tx); }