|
|
@ -64,7 +64,7 @@ int32_t komodo_kvsearch(uint256 *pubkeyp,int32_t current_height,uint32_t *flagsp |
|
|
|
if ( ptr != 0 ) |
|
|
|
{ |
|
|
|
duration = komodo_kvduration(ptr->flags); |
|
|
|
fprintf(stderr,"duration.%d flags.%d current.%d ht.%d keylen.%d valuesize.%d\n",duration,ptr->flags,current_height,ptr->height,ptr->keylen,ptr->valuesize); |
|
|
|
//fprintf(stderr,"duration.%d flags.%d current.%d ht.%d keylen.%d valuesize.%d\n",duration,ptr->flags,current_height,ptr->height,ptr->keylen,ptr->valuesize);
|
|
|
|
if ( current_height > (ptr->height + duration) ) |
|
|
|
{ |
|
|
|
HASH_DELETE(hh,KOMODO_KV,ptr); |
|
|
@ -117,7 +117,7 @@ void komodo_kvupdate(uint8_t *opretbuf,int32_t opretlen,uint64_t value) |
|
|
|
} |
|
|
|
valueptr = &key[keylen]; |
|
|
|
fee = komodo_kvfee(flags,opretlen,keylen); |
|
|
|
printf("fee %.8f vs %.8f flags.%d keylen.%d valuesize.%d height.%d (%02x %02x %02x) (%02x %02x %02x)\n",(double)fee/COIN,(double)value/COIN,flags,keylen,valuesize,height,key[0],key[1],key[2],valueptr[0],valueptr[1],valueptr[2]); |
|
|
|
//printf("fee %.8f vs %.8f flags.%d keylen.%d valuesize.%d height.%d (%02x %02x %02x) (%02x %02x %02x)\n",(double)fee/COIN,(double)value/COIN,flags,keylen,valuesize,height,key[0],key[1],key[2],valueptr[0],valueptr[1],valueptr[2]);
|
|
|
|
if ( value >= fee ) |
|
|
|
{ |
|
|
|
coresize = (int32_t)(sizeof(flags)+sizeof(height)+sizeof(keylen)+sizeof(valuesize)+keylen+valuesize+1); |
|
|
|