computeHash calculates final hash from hash0
(shardIdx uint64, hash0 common.Hash)
| 707 | |
| 708 | // computeHash calculates final hash from hash0 |
| 709 | func (w *worker) computeHash(shardIdx uint64, hash0 common.Hash) (common.Hash, []uint64, error) { |
| 710 | return hashimoto( |
| 711 | w.storageMgr.KvEntriesBits(), |
| 712 | w.storageMgr.MaxKvSizeBits(), |
| 713 | es.SampleSizeBits, |
| 714 | shardIdx, |
| 715 | w.config.RandomChecks, |
| 716 | w.dataReader.ReadSample, |
| 717 | hash0, |
| 718 | ) |
| 719 | } |
| 720 | |
| 721 | // getMiningData retrieves data needed to generate proof and verify against the contract. |
| 722 | func (w *worker) getMiningData(t *task, sampleIdx []uint64) ([][]byte, []uint64, []uint64, []common.Hash, []common.Hash, error) { |
no test coverage detected