aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/ethash/algorithm.go
diff options
context:
space:
mode:
authorWenbiao Zheng <delweng@gmail.com>2018-07-24 08:14:15 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-07-24 08:14:15 +0800
commitf6206efe5bcf28942990e35ef373d273e9785372 (patch)
tree401fdace59be9cead1f19181b071f70dbec6b0e2 /consensus/ethash/algorithm.go
parentae674a3660ff7655c9b79bf0c01af0a363efdf4d (diff)
downloadgo-tangerine-f6206efe5bcf28942990e35ef373d273e9785372.tar.gz
go-tangerine-f6206efe5bcf28942990e35ef373d273e9785372.tar.zst
go-tangerine-f6206efe5bcf28942990e35ef373d273e9785372.zip
consensus: move test use only var/func to test(#17004)
Diffstat (limited to 'consensus/ethash/algorithm.go')
-rw-r--r--consensus/ethash/algorithm.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/consensus/ethash/algorithm.go b/consensus/ethash/algorithm.go
index fa1c2c824..f252a7f3a 100644
--- a/consensus/ethash/algorithm.go
+++ b/consensus/ethash/algorithm.go
@@ -214,15 +214,6 @@ func swap(buffer []byte) {
}
}
-// prepare converts an ethash cache or dataset from a byte stream into the internal
-// int representation. All ethash methods work with ints to avoid constant byte to
-// int conversions as well as to handle both little and big endian systems.
-func prepare(dest []uint32, src []byte) {
- for i := 0; i < len(dest); i++ {
- dest[i] = binary.LittleEndian.Uint32(src[i*4:])
- }
-}
-
// fnv is an algorithm inspired by the FNV hash, which in some cases is used as
// a non-associative substitute for XOR. Note that we multiply the prime with
// the full 32-bit input, in contrast with the FNV-1 spec which multiplies the