Skip to content
This repository was archived by the owner on Feb 16, 2024. It is now read-only.

Commit 4fcf4d2

Browse files
committed
standardized dag algorithms
1 parent afdbfbb commit 4fcf4d2

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

firopow/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (c *Client) Compute(height, nonce uint64, hash []byte) ([]byte, []byte) {
5757
cache := c.GetCache(epoch)
5858
lookup := c.NewLookupFunc2048(cache, epoch)
5959

60-
mix, digest := compute(hash, height, nonce, datasetSize, lookup, cache.L1())
60+
mix, digest := firopow(hash, height, nonce, datasetSize, lookup, cache.L1())
6161
runtime.KeepAlive(cache)
6262

6363
return mix, digest

firopow/firopow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func finalize(seed [25]uint32, mixHash []byte) []byte {
4747
return digest
4848
}
4949

50-
func compute(hash []byte, height, nonce, datasetSize uint64, lookup func(index uint32) []uint32, l1 []uint32) ([]byte, []byte) {
50+
func firopow(hash []byte, height, nonce, datasetSize uint64, lookup func(index uint32) []uint32, l1 []uint32) ([]byte, []byte) {
5151
cfg := &progpow.Config{
5252
PeriodLength: 1,
5353
DagLoads: 4,
File renamed without changes.

kawpow/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ func NewRavencoin() *Client {
6969

7070
func (c *Client) Compute(height, nonce uint64, hash []byte) ([]byte, []byte) {
7171
epoch := c.CalcEpoch(height)
72-
datasetSize := c.DatasetSize(epoch)
72+
size := c.DatasetSize(epoch)
7373
cache := c.GetCache(epoch)
7474
lookup := c.NewLookupFunc2048(cache, epoch)
7575

76-
mix, digest := compute(hash, height, nonce, datasetSize, lookup, cache.L1())
76+
mix, digest := kawpow(hash, height, nonce, size, lookup, cache.L1())
7777
runtime.KeepAlive(cache)
7878

7979
return mix, digest

kawpow/kawpow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func finalize(seed [25]uint32, mixHash []byte) []byte {
6868
return digest
6969
}
7070

71-
func compute(hash []byte, height, nonce, datasetSize uint64, lookup func(index uint32) []uint32, l1 []uint32) ([]byte, []byte) {
71+
func kawpow(hash []byte, height, nonce, datasetSize uint64, lookup func(index uint32) []uint32, l1 []uint32) ([]byte, []byte) {
7272
var cfg = &progpow.Config{
7373
PeriodLength: 3,
7474
DagLoads: 4,

0 commit comments

Comments
 (0)