This commit is contained in:
jl777
2019-01-12 01:08:17 -11:00
parent 80951db6b2
commit 9e55c20725
2 changed files with 14 additions and 11 deletions

View File

@@ -116,6 +116,8 @@ 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);
if ( 0 )
{
int32_t d,histo[365*2+30]; int32_t d,histo[365*2+30];
memset(histo,0,sizeof(histo)); memset(histo,0,sizeof(histo));
for (ht=2; ht<1000000; ht+=MARMARA_GROUPSIZE) for (ht=2; ht<1000000; ht+=MARMARA_GROUPSIZE)
@@ -128,6 +130,7 @@ int32_t MarmaraValidateCoinbase(int32_t height,CTransaction tx)
for (ht=0; ht<sizeof(histo)/sizeof(*histo); ht++) for (ht=0; ht<sizeof(histo)/sizeof(*histo); ht++)
fprintf(stderr,"%d ",histo[ht]); fprintf(stderr,"%d ",histo[ht]);
fprintf(stderr,"<- unlock histogram[%d] by days locked\n",(int32_t)(sizeof(histo)/sizeof(*histo))); fprintf(stderr,"<- unlock histogram[%d] by days locked\n",(int32_t)(sizeof(histo)/sizeof(*histo)));
}
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 )

View File

@@ -693,7 +693,7 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
{ {
if ( MarmaraValidateCoinbase(height,block.vtx[0]) < 0 ) if ( MarmaraValidateCoinbase(height,block.vtx[0]) < 0 )
{ {
fprintf(stderr,"MARMARA constrains even height blocks to pay 100%% to CC in vout0 with opreturn\n"); fprintf(stderr,"MARMARA error ht.%d constrains even height blocks to pay 100%% to CC in vout0 with opreturn\n",height);
return(-1); return(-1);
} }
} }