From c269ecf5d9d205bf8a308cee1444e15895748988 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 12 Aug 2018 23:05:56 -1100 Subject: [PATCH] Get right total to unlock! --- src/cc/rewards.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index 86b48371d..a378c56a3 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -257,7 +257,7 @@ bool RewardsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t return eval->Invalid("unlock tx vout.1 mismatched scriptPubKey"); amount = vinTx.vout[0].nValue; reward = RewardsCalc(amount,tx.vin[0].prevout.hash,APR,minseconds,maxseconds,mindeposit); - if ( RewardsExactAmounts(cp,eval,tx,txfee+reward,sbits,fundingtxid) == 0 ) + if ( RewardsExactAmounts(cp,eval,tx,txfee+vinTx.vout[1].nValue,sbits,fundingtxid) == 0 ) return false; else if ( tx.vout[1].nValue > amount+reward ) return eval->Invalid("unlock tx vout.1 isnt amount+reward");