Even heights with constraint so ac_supply is unlocked

This commit is contained in:
jl777
2019-01-12 00:37:41 -11:00
parent 99f0709686
commit c0a9c015ad
2 changed files with 4 additions and 2 deletions

View File

@@ -119,6 +119,8 @@ int32_t MarmaraValidateCoinbase(int32_t height,CTransaction tx)
for (ht=0; ht<10000; ht+=MARMARA_GROUPSIZE/3)
fprintf(stderr,"%d ",MarmaraUnlockht(ht));
fprintf(stderr,"<- unlock hts\n");
if ( (height & 1) != 0 )
return(0);
if ( tx.vout.size() == 2 && tx.vout[1].nValue == 0 )
{
if ( DecodeMaramaraCoinbaseOpRet(tx.vout[1].scriptPubKey,pk,ht,unlockht) == 'C' )

View File

@@ -689,11 +689,11 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
}
}
}
if ( ASSETCHAINS_MARMARA != 0 && (height & 1) != 0 )
if ( height > 0 && ASSETCHAINS_MARMARA != 0 && (height & 1) == 0 )
{
if ( MarmaraValidateCoinbase(height,block.vtx[0]) < 0 )
{
fprintf(stderr,"MARMARA constrains odd height blocks to pay 100%% to CC in vout0 with opreturn\n");
fprintf(stderr,"MARMARA constrains even height blocks to pay 100%% to CC in vout0 with opreturn\n");
return(-1);
}
}