Browse Source

test

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

6
iguana/iguana_unspents.c

@ -854,13 +854,13 @@ struct iguana_utxoaddr *iguana_utxoaddrfind(int32_t createflag,struct iguana_inf
utxoaddr = calloc(1,sizeof(*utxoaddr));//&coin->UTXOADDRDATA[++coin->utxoaddrind]; utxoaddr = calloc(1,sizeof(*utxoaddr));//&coin->UTXOADDRDATA[++coin->utxoaddrind];
++coin->utxoaddrind; ++coin->utxoaddrind;
memcpy(utxoaddr->rmd160,rmd160,sizeof(utxoaddr->rmd160)); memcpy(utxoaddr->rmd160,rmd160,sizeof(utxoaddr->rmd160));
int32_t i; for (i=0; i<20; i++)
printf("%02x",rmd160[i]);
printf(" %d of %d: %p\n",coin->utxoaddrind,coin->utxodatasize,coin->utxoaddrs);
HASH_ADD_KEYPTR(hh,coin->utxoaddrs,utxoaddr->rmd160,sizeof(utxoaddr->rmd160),utxoaddr); HASH_ADD_KEYPTR(hh,coin->utxoaddrs,utxoaddr->rmd160,sizeof(utxoaddr->rmd160),utxoaddr);
HASH_FIND(hh,coin->utxoaddrs,rmd160,sizeof(utxoaddr->rmd160),utxoaddr); HASH_FIND(hh,coin->utxoaddrs,rmd160,sizeof(utxoaddr->rmd160),utxoaddr);
if ( utxoaddr == 0 ) if ( utxoaddr == 0 )
{ {
int32_t i; for (i=0; i<20; i++)
printf("%02x",rmd160[i]);
printf(" %d of %d: %p ",coin->utxoaddrind,coin->utxodatasize,coin->utxoaddrs);
printf("failed to find just added %d of %d\n",coin->utxoaddrind,coin->utxodatasize); printf("failed to find just added %d of %d\n",coin->utxoaddrind,coin->utxodatasize);
} }
}// else printf("UTXOTABLE overflow?? %d vs %d\n",coin->utxoaddrind,coin->utxodatasize); }// else printf("UTXOTABLE overflow?? %d vs %d\n",coin->utxoaddrind,coin->utxodatasize);

Loading…
Cancel
Save