diff options
author | obscuren <obscuren@obscura.com> | 2013-12-27 19:07:37 +0800 |
---|---|---|
committer | obscuren <obscuren@obscura.com> | 2013-12-27 19:07:37 +0800 |
commit | b40013ac30006fe5a43abdca574b438cf60db86e (patch) | |
tree | fdb83f78f18b793b53fb5c98d85aa2f5f55aec71 | |
parent | ec13db873aa43368bfb155dad03ef537e4635717 (diff) | |
download | go-tangerine-b40013ac30006fe5a43abdca574b438cf60db86e.tar.gz go-tangerine-b40013ac30006fe5a43abdca574b438cf60db86e.tar.zst go-tangerine-b40013ac30006fe5a43abdca574b438cf60db86e.zip |
Updated fees
-rw-r--r-- | transaction.go | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/transaction.go b/transaction.go index f78715d8c..26d7df258 100644 --- a/transaction.go +++ b/transaction.go @@ -21,12 +21,13 @@ data ops * signature signature 64 bytes */ -var StepFee *big.Int = new(big.Int) -var TxFee *big.Int = new(big.Int) -var MemFee *big.Int = new(big.Int) -var DataFee *big.Int = new(big.Int) -var CryptoFee *big.Int = new(big.Int) -var ExtroFee *big.Int = new(big.Int) +var StepFee *big.Int = new(big.Int) +var TxFee *big.Int = new(big.Int) +var ContractFee *big.Int = new(big.Int) +var MemFee *big.Int = new(big.Int) +var DataFee *big.Int = new(big.Int) +var CryptoFee *big.Int = new(big.Int) +var ExtroFee *big.Int = new(big.Int) var Period1Reward *big.Int = new(big.Int) var Period2Reward *big.Int = new(big.Int) @@ -89,27 +90,30 @@ func (tx *Transaction) Serialize() string { func InitFees() { // Base for 2**60 b60 := new(big.Int) - b60.Exp(big.NewInt(2), big.NewInt(60), big.NewInt(0)) + b60.Exp(big.NewInt(2), big.NewInt(64), big.NewInt(0)) // Base for 2**80 b80 := new(big.Int) b80.Exp(big.NewInt(2), big.NewInt(80), big.NewInt(0)) - StepFee.Mul(b60, big.NewInt(4096)) + StepFee.Div(b60, big.NewInt(64)) //fmt.Println("StepFee:", StepFee) - TxFee.Mul(b60, big.NewInt(524288)) + TxFee.Exp(big.NewInt(2), big.NewInt(64), big.NewInt(0)) //fmt.Println("TxFee:", TxFee) - MemFee.Mul(b60, big.NewInt(262144)) + ContractFee.Exp(big.NewInt(2), big.NewInt(64), big.NewInt(0)) + //fmt.Println("ContractFee:", ContractFee) + + MemFee.Div(b60, big.NewInt(4)) //fmt.Println("MemFee:", MemFee) - DataFee.Mul(b60, big.NewInt(16384)) + DataFee.Div(b60, big.NewInt(16)) //fmt.Println("DataFee:", DataFee) - CryptoFee.Mul(b60, big.NewInt(65536)) + CryptoFee.Div(b60, big.NewInt(16)) //fmt.Println("CrytoFee:", CryptoFee) - ExtroFee.Mul(b60, big.NewInt(65536)) + ExtroFee.Div(b60, big.NewInt(16)) //fmt.Println("ExtroFee:", ExtroFee) Period1Reward.Mul(b80, big.NewInt(1024)) |