Merge pull request #1356 from blackjok3rtt/jl777

small fix
This commit is contained in:
jl777
2019-03-26 03:39:10 -11:00
committed by GitHub

View File

@@ -258,10 +258,12 @@ bool RewardsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
if ( !CheckTxFee(tx, txfee, chainActive.LastTip()->GetHeight(), chainActive.LastTip()->nTime) )
return eval->Invalid("txfee is too high");
reward = RewardsCalc(amount,tx.vin[0].prevout.hash,APR,minseconds,maxseconds,mindeposit);
if ( numvins == 1 && tx.vout[0].scriptPubKey.IsPayToCryptoCondition() == 0 && tx.vout[1].nValue == 10000 )
if ( numvins == 1 && tx.vout[0].scriptPubKey.IsPayToCryptoCondition() == 0 )
{
if ( reward == 0 )
return eval->Invalid("unlock recover no rewards");
else if ( tx.vout[1].nValue != 10000 )
return eval->Invalid("wrong marker vour value");
else if ( tx.vout[1].scriptPubKey != tx.vout[0].scriptPubKey )
return eval->Invalid("unlock recover tx vout.1 mismatched scriptPubKey");
else if ( tx.vout[0].scriptPubKey != vinTx.vout[1].scriptPubKey )