|
|
@ -21,12 +21,13 @@ data ops * |
|
|
|
signature signature 64 bytes |
|
|
|
signature signature 64 bytes |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
var StepFee *big.Int = new(big.Int) |
|
|
|
var StepFee *big.Int = new(big.Int) |
|
|
|
var TxFee *big.Int = new(big.Int) |
|
|
|
var TxFee *big.Int = new(big.Int) |
|
|
|
var MemFee *big.Int = new(big.Int) |
|
|
|
var ContractFee *big.Int = new(big.Int) |
|
|
|
var DataFee *big.Int = new(big.Int) |
|
|
|
var MemFee *big.Int = new(big.Int) |
|
|
|
var CryptoFee *big.Int = new(big.Int) |
|
|
|
var DataFee *big.Int = new(big.Int) |
|
|
|
var ExtroFee *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 Period1Reward *big.Int = new(big.Int) |
|
|
|
var Period2Reward *big.Int = new(big.Int) |
|
|
|
var Period2Reward *big.Int = new(big.Int) |
|
|
@ -89,27 +90,30 @@ func (tx *Transaction) Serialize() string { |
|
|
|
func InitFees() { |
|
|
|
func InitFees() { |
|
|
|
// Base for 2**60
|
|
|
|
// Base for 2**60
|
|
|
|
b60 := new(big.Int) |
|
|
|
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
|
|
|
|
// Base for 2**80
|
|
|
|
b80 := new(big.Int) |
|
|
|
b80 := new(big.Int) |
|
|
|
b80.Exp(big.NewInt(2), big.NewInt(80), big.NewInt(0)) |
|
|
|
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)
|
|
|
|
//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)
|
|
|
|
//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)
|
|
|
|
//fmt.Println("MemFee:", MemFee)
|
|
|
|
|
|
|
|
|
|
|
|
DataFee.Mul(b60, big.NewInt(16384)) |
|
|
|
DataFee.Div(b60, big.NewInt(16)) |
|
|
|
//fmt.Println("DataFee:", DataFee)
|
|
|
|
//fmt.Println("DataFee:", DataFee)
|
|
|
|
|
|
|
|
|
|
|
|
CryptoFee.Mul(b60, big.NewInt(65536)) |
|
|
|
CryptoFee.Div(b60, big.NewInt(16)) |
|
|
|
//fmt.Println("CrytoFee:", CryptoFee)
|
|
|
|
//fmt.Println("CrytoFee:", CryptoFee)
|
|
|
|
|
|
|
|
|
|
|
|
ExtroFee.Mul(b60, big.NewInt(65536)) |
|
|
|
ExtroFee.Div(b60, big.NewInt(16)) |
|
|
|
//fmt.Println("ExtroFee:", ExtroFee)
|
|
|
|
//fmt.Println("ExtroFee:", ExtroFee)
|
|
|
|
|
|
|
|
|
|
|
|
Period1Reward.Mul(b80, big.NewInt(1024)) |
|
|
|
Period1Reward.Mul(b80, big.NewInt(1024)) |
|
|
|