Histogram
This commit is contained in:
@@ -116,9 +116,18 @@ int32_t MarmaraValidateCoinbase(int32_t height,CTransaction tx)
|
|||||||
{
|
{
|
||||||
struct CCcontract_info *cp,C; CPubKey pk; int32_t ht,unlockht; CTxOut ccvout;
|
struct CCcontract_info *cp,C; CPubKey pk; int32_t ht,unlockht; CTxOut ccvout;
|
||||||
cp = CCinit(&C,EVAL_MARMARA);
|
cp = CCinit(&C,EVAL_MARMARA);
|
||||||
for (ht=0; ht<10000; ht+=MARMARA_GROUPSIZE/3)
|
int32_t d,histo[365*2];
|
||||||
fprintf(stderr,"%d ",MarmaraUnlockht(ht));
|
for (ht=2; ht<1000000; ht+=MARMARA_GROUPSIZE)
|
||||||
fprintf(stderr,"<- unlock hts\n");
|
{
|
||||||
|
memset(histo,0,sizeof(histo));
|
||||||
|
d = (MarmaraUnlockht(ht) - ht) / 1440
|
||||||
|
if ( d < 0 || d > sizeof(histo)/sizeof(*histo) )
|
||||||
|
fprintf(stderr,"d error.%d at ht.%d\n",d,ht);
|
||||||
|
else histo[d]++;
|
||||||
|
}
|
||||||
|
for (ht=0; ht<sizeof(histo)/sizeof(*histo); ht++)
|
||||||
|
fprintf(stderr,"%d ",histo[ht]);
|
||||||
|
fprintf(stderr,"<- unlock histogram by days locked\n");
|
||||||
if ( (height & 1) != 0 )
|
if ( (height & 1) != 0 )
|
||||||
return(0);
|
return(0);
|
||||||
if ( tx.vout.size() == 2 && tx.vout[1].nValue == 0 )
|
if ( tx.vout.size() == 2 && tx.vout[1].nValue == 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user