Fix < txfee cashout

This commit is contained in:
jl777
2019-03-14 21:16:19 -11:00
parent 7f5ca7d6a4
commit fc2ae0cbe8

View File

@@ -1279,6 +1279,8 @@ UniValue rogue_finishgame(uint64_t txfee,struct CCcontract_info *cp,cJSON *param
} }
cashout += numplayers * buyin; cashout += numplayers * buyin;
} }
if ( cashout < txfee )
cashout = txfee;
if ( cashout >= txfee ) if ( cashout >= txfee )
{ {
if ( (inputsum= AddCClibInputs(cp,mtx,roguepk,cashout,16,cp->unspendableCCaddr)) > (uint64_t)P.gold*mult ) if ( (inputsum= AddCClibInputs(cp,mtx,roguepk,cashout,16,cp->unspendableCCaddr)) > (uint64_t)P.gold*mult )