Commit 4c7d0467 authored by vipwzw's avatar vipwzw

auto ci

parent 2f8cb126
......@@ -6,11 +6,12 @@ package executor
import (
"fmt"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table"
"math/big"
"strings"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/account"
"github.com/33cn/chain33/common"
dbm "github.com/33cn/chain33/common/db"
......@@ -613,7 +614,7 @@ func (action *Action) GamePublish(publish *gty.GuessGamePublish) (*types.Receipt
if game.DevFeeFactor > 0 {
fee := big.NewInt(totalBetsNumber)
factor := big.NewInt(game.DevFeeFactor)
factor := big.NewInt(game.DevFeeFactor)
thousand := big.NewInt(1000)
devFee = fee.Mul(fee, factor).Div(fee, thousand).Int64()
receipt, err := action.coinsAccount.ExecTransfer(game.AdminAddr, devAddr, action.execaddr, devFee)
......@@ -629,7 +630,7 @@ func (action *Action) GamePublish(publish *gty.GuessGamePublish) (*types.Receipt
if game.PlatFeeFactor > 0 {
fee := big.NewInt(totalBetsNumber)
factor := big.NewInt(game.PlatFeeFactor)
factor := big.NewInt(game.PlatFeeFactor)
thousand := big.NewInt(1000)
platFee = fee.Mul(fee, factor).Div(fee, thousand).Int64()
receipt, err := action.coinsAccount.ExecTransfer(game.AdminAddr, platAddr, action.execaddr, platFee)
......@@ -649,7 +650,7 @@ func (action *Action) GamePublish(publish *gty.GuessGamePublish) (*types.Receipt
player := game.Plays[j]
if trimStr(player.Bet.Option) == trimStr(game.Result) {
betsNumber := big.NewInt(player.Bet.BetsNumber)
totalWinBetsNumber := big.NewInt(winBetsNumber)
totalWinBetsNumber := big.NewInt(winBetsNumber)
leftWinBetsNumber := big.NewInt(winValue)
value := betsNumber.Mul(betsNumber, leftWinBetsNumber).Div(betsNumber, totalWinBetsNumber).Int64()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment