From 763ec3cae7f5235ae222426198f04f2eca8a4b57 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 28 Jul 2018 00:44:12 -1100 Subject: [PATCH] Test --- src/cc/rewards.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index b6a83c15e..1a94f34ef 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -246,6 +246,8 @@ bool RewardsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t return eval->Invalid("unlock tx vout.0 is normal output"); else if ( tx.vout[1].scriptPubKey.IsPayToCryptoCondition() != 0 ) return eval->Invalid("unlock tx vout.1 is CC output"); + else if ( tx.vout[1].scriptPubKey != vinTx.vout[1].scriptPubKey ) + return eval->Invalid("unlock tx vout.1 mismatched scriptPubKey"); amount = vinTx.vout[0].nValue; reward = RewardsCalc(amount,txid,APR,minseconds,maxseconds,mindeposit); if ( tx.vout[1].nValue > amount+reward )