()
| 127 | } |
| 128 | |
| 129 | func (s *Share) buildDagTree() { |
| 130 | indices := ethash.Instance.GetVerificationIndices(s) |
| 131 | s.dt = mtree.NewDagTree() |
| 132 | s.dt.RegisterIndex(indices...) |
| 133 | seedHash, err := ethash.GetSeedHash(s.NumberU64()) |
| 134 | if err != nil { |
| 135 | panic(err) |
| 136 | } |
| 137 | path := filepath.Join( |
| 138 | ethash.DefaultDir, |
| 139 | fmt.Sprintf("full-R%s-%s", "23", hex.EncodeToString(seedHash[:8])), |
| 140 | ) |
| 141 | processDuringRead(path, s.dt) |
| 142 | s.dt.Finalize() |
| 143 | } |
| 144 | |
| 145 | func (s *Share) DAGElementArray() []*big.Int { |
| 146 | if s.dt == nil { |
no test coverage detected