Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
b40013ac
Commit
b40013ac
authored
Dec 27, 2013
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated fees
parent
ec13db87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
transaction.go
transaction.go
+17
-13
No files found.
transaction.go
View file @
b40013ac
...
@@ -21,12 +21,13 @@ data ops *
...
@@ -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 {
...
@@ -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
(
6
0
),
big
.
NewInt
(
0
))
b60
.
Exp
(
big
.
NewInt
(
2
),
big
.
NewInt
(
6
4
),
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
(
6553
6
))
CryptoFee
.
Div
(
b60
,
big
.
NewInt
(
1
6
))
//fmt.Println("CrytoFee:", CryptoFee)
//fmt.Println("CrytoFee:", CryptoFee)
ExtroFee
.
Mul
(
b60
,
big
.
NewInt
(
6553
6
))
ExtroFee
.
Div
(
b60
,
big
.
NewInt
(
1
6
))
//fmt.Println("ExtroFee:", ExtroFee)
//fmt.Println("ExtroFee:", ExtroFee)
Period1Reward
.
Mul
(
b80
,
big
.
NewInt
(
1024
))
Period1Reward
.
Mul
(
b80
,
big
.
NewInt
(
1024
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment