This commit is contained in:
jl777
2018-07-23 19:47:53 -11:00
parent 0548be2094
commit 723ae0eab9
2 changed files with 16 additions and 0 deletions

View File

@@ -127,12 +127,19 @@ bool RewardsValidate(Eval* eval,const CTransaction &tx)
bool ProcessRewards(Eval* eval, std::vector<uint8_t> paramsNull,const CTransaction &ctx, unsigned int nIn)
{
static uint256 prevtxid; uint256 txid;
txid = ctx.GetHash();
if ( txid == prevtxid )
return(true);
if ( paramsNull.size() != 0 ) // Don't expect params
return eval->Invalid("Cannot have params");
else if ( ctx.vout.size() == 0 )
return eval->Invalid("no-vouts");
if ( RewardsValidate(eval,ctx) != 0 )
{
prevtxid = txid;
return(true);
}
else return(false);
}