Test
This commit is contained in:
@@ -40,7 +40,10 @@ void komodo_eventadd_notarized(struct komodo_state *sp,char *symbol,int32_t heig
|
|||||||
{
|
{
|
||||||
struct komodo_event_notarized N;
|
struct komodo_event_notarized N;
|
||||||
if ( komodo_verifynotarization(symbol,dest,height,notarizedheight,notarized_hash,notarized_desttxid) != 0 )
|
if ( komodo_verifynotarization(symbol,dest,height,notarizedheight,notarized_hash,notarized_desttxid) != 0 )
|
||||||
printf("[%s] error validating notarization ht.%d notarized_height.%d\n",ASSETCHAINS_SYMBOL,height,notarizedheight);
|
{
|
||||||
|
if ( height > 50000 )
|
||||||
|
printf("[%s] error validating notarization ht.%d notarized_height.%d\n",ASSETCHAINS_SYMBOL,height,notarizedheight);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memset(&N,0,sizeof(N));
|
memset(&N,0,sizeof(N));
|
||||||
|
|||||||
@@ -136,11 +136,11 @@ uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uin
|
|||||||
{
|
{
|
||||||
numerator = (nValue / 20); // assumes 5%!
|
numerator = (nValue / 20); // assumes 5%!
|
||||||
interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60));
|
interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60));
|
||||||
//fprintf(stderr,"interest %llu %.8f <- numerator.%llu minutes.%d\n",(long long)interest,(double)interest/COIN,(long long)numerator,(int32_t)minutes);
|
fprintf(stderr,"interest %llu %.8f <- numerator.%llu minutes.%d\n",(long long)interest,(double)interest/COIN,(long long)numerator,(int32_t)minutes);
|
||||||
}
|
}
|
||||||
if ( 0 && numerator == (nValue * KOMODO_INTEREST) )
|
|
||||||
fprintf(stderr,"komodo_interest.%d %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu) prod.%llu\n",txheight,(long long)nValue,(double)nValue/COIN,nLockTime,tiptime,minutes,(long long)interest,(double)interest/COIN,(long long)numerator,(long long)denominator,(long long)(numerator * minutes));
|
|
||||||
}
|
}
|
||||||
|
if ( 1 && numerator == (nValue * KOMODO_INTEREST) )
|
||||||
|
fprintf(stderr,"komodo_interest.%d %lld %.8f nLockTime.%u tiptime.%u minutes.%d interest %lld %.8f (%llu / %llu) prod.%llu\n",txheight,(long long)nValue,(double)nValue/COIN,nLockTime,tiptime,minutes,(long long)interest,(double)interest/COIN,(long long)numerator,(long long)denominator,(long long)(numerator * minutes));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(interest);
|
return(interest);
|
||||||
|
|||||||
Reference in New Issue
Block a user