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
4b5e7972
Commit
4b5e7972
authored
Oct 13, 2017
by
Péter Szilágyi
Committed by
GitHub
Oct 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15287 from ernestodeltoro/typo_thoretical
ethash: fix typo
parents
8d8034fe
2e83c82f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
algorithm.go
consensus/ethash/algorithm.go
+3
-3
No files found.
consensus/ethash/algorithm.go
View file @
4b5e7972
...
...
@@ -102,7 +102,7 @@ func generateCache(dest []uint32, epoch uint64, seed []byte) {
header
.
Cap
*=
4
cache
:=
*
(
*
[]
byte
)(
unsafe
.
Pointer
(
&
header
))
// Calculate the number of thoretical rows (we'll store in one buffer nonetheless)
// Calculate the number of th
e
oretical rows (we'll store in one buffer nonetheless)
size
:=
uint64
(
len
(
cache
))
rows
:=
int
(
size
)
/
hashBytes
...
...
@@ -187,7 +187,7 @@ func fnvHash(mix []uint32, data []uint32) {
// generateDatasetItem combines data from 256 pseudorandomly selected cache nodes,
// and hashes that to compute a single dataset node.
func
generateDatasetItem
(
cache
[]
uint32
,
index
uint32
,
keccak512
hasher
)
[]
byte
{
// Calculate the number of thoretical rows (we use one buffer nonetheless)
// Calculate the number of th
e
oretical rows (we use one buffer nonetheless)
rows
:=
uint32
(
len
(
cache
)
/
hashWords
)
// Initialize the mix
...
...
@@ -287,7 +287,7 @@ func generateDataset(dest []uint32, epoch uint64, cache []uint32) {
// hashimoto aggregates data from the full dataset in order to produce our final
// value for a particular header hash and nonce.
func
hashimoto
(
hash
[]
byte
,
nonce
uint64
,
size
uint64
,
lookup
func
(
index
uint32
)
[]
uint32
)
([]
byte
,
[]
byte
)
{
// Calculate the number of thoretical rows (we use one buffer nonetheless)
// Calculate the number of th
e
oretical rows (we use one buffer nonetheless)
rows
:=
uint32
(
size
/
mixBytes
)
// Combine header+nonce into a 64 byte seed
...
...
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