Skip to content

datasetSize

Source (upstream pre-purge) Current
File consensus/ethash/algorithm.go algorithm.go
Symbol datasetSize datasetSize
Ref dde2da0ef~1 etc/v1.17.3-full-node

3-way merge — purge → getc ← upstream

pre-purgecore-geth≈ adapted (origin inferred by similarity)
// datasetSize returns the size of the ethash mining dataset that belongs to a certain
// block number.
func datasetSize(epoch uint64) uint64 {
if epoch < maxEpoch {
return datasetSizes[int(epoch)]
}
return calcDatasetSize(int(epoch))
core-geth validation — +1 -1 | | | |---|---| | File | [`algorithm.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/consensus/ethash/algorithm.go) | | Symbol | `datasetSize` | | Ref | `v1.12.20` |
--- a/core-geth/consensus/ethash/algorithm.go
+++ b/etc/consensus/ethash/algorithm.go
@@ -4,5 +4,5 @@
    if epoch < maxEpoch {
        return datasetSizes[int(epoch)]
    }
-   return calcDatasetSize(epoch)
+   return calcDatasetSize(int(epoch))
 }

← Consensus & Ethash