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
74f6d901
Commit
74f6d901
authored
Aug 06, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils, core: disable exp diff for olympic net
parent
82ef26f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
cmd.go
cmd/utils/cmd.go
+2
-0
chain_util.go
core/chain_util.go
+2
-2
No files found.
cmd/utils/cmd.go
View file @
74f6d901
...
...
@@ -21,6 +21,7 @@ import (
"bufio"
"fmt"
"io"
"math"
"math/big"
"os"
"os/signal"
...
...
@@ -152,6 +153,7 @@ func InitOlympic() {
params
.
MaximumExtraDataSize
=
big
.
NewInt
(
1024
)
NetworkIdFlag
.
Value
=
0
core
.
BlockReward
=
big
.
NewInt
(
1.5e+18
)
core
.
ExpDiffPeriod
=
big
.
NewInt
(
math
.
MaxInt64
)
}
func
FormatTransactionData
(
data
string
)
[]
byte
{
...
...
core/chain_util.go
View file @
74f6d901
...
...
@@ -32,7 +32,7 @@ import (
var
(
blockHashPre
=
[]
byte
(
"block-hash-"
)
blockNumPre
=
[]
byte
(
"block-num-"
)
e
xpDiffPeriod
=
big
.
NewInt
(
100000
)
E
xpDiffPeriod
=
big
.
NewInt
(
100000
)
)
// CalcDifficulty is the difficulty adjustment algorithm. It returns
...
...
@@ -57,7 +57,7 @@ func CalcDifficulty(time, parentTime uint64, parentNumber, parentDiff *big.Int)
}
periodCount
:=
new
(
big
.
Int
)
.
Add
(
parentNumber
,
common
.
Big1
)
periodCount
.
Div
(
periodCount
,
e
xpDiffPeriod
)
periodCount
.
Div
(
periodCount
,
E
xpDiffPeriod
)
if
periodCount
.
Cmp
(
common
.
Big1
)
>
0
{
// diff = diff + 2^(periodCount - 2)
expDiff
:=
periodCount
.
Sub
(
periodCount
,
common
.
Big2
)
...
...
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