Marmara coinbase initial impl

This commit is contained in:
jl777
2019-01-12 00:29:37 -11:00
parent 46a1c07e5e
commit 2bde89c9ce
6 changed files with 85 additions and 3 deletions

View File

@@ -16,6 +16,8 @@
// paxdeposit equivalent in reverse makes opreturn and KMD does the same in reverse
#include "komodo_defs.h"
int32_t MarmaraValidateCoinbase(int32_t height,CTransaction tx);
int32_t pax_fiatstatus(uint64_t *available,uint64_t *deposited,uint64_t *issued,uint64_t *withdrawn,uint64_t *approved,uint64_t *redeemed,char *base)
{
int32_t baseid; struct komodo_state *sp; int64_t netliability,maxallowed,maxval;
@@ -687,6 +689,14 @@ int32_t komodo_check_deposit(int32_t height,const CBlock& block,uint32_t prevtim
}
}
}
if ( 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\n");
return(-1);
}
}
// we don't want these checks in VRSC, leave it at the Sapling upgrade
if ( ASSETCHAINS_SYMBOL[0] == 0 ||
(ASSETCHAINS_COMMISSION != 0 && height > 1) ||