forked from cerc-io/plugeth
Updated fees
This commit is contained in:
parent
ec13db873a
commit
b40013ac30
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user