sencha-dev/powkit

Etica

Closed this issue · 1 comments

Hello. Can you add support for etica (etchash) ?

nottug commented

I don't really know what Etica is, but if this is its github repo (https://github.com/etica/core-geth), then there are no changes and etchash already works.

package main

import (
	"fmt"

	"github.com/sencha-dev/powkit/ethash"
)

func main() {
	hash := make([]byte, 32)
	var nonce, height uint64

	client := ethash.NewEthereumClassic()
	digest, mixDigest, err := client.Compute(hash, nonce, height)
	if err != nil {
		panic(err)
	}

	fmt.Printf("digest: %x\nmix digest: %x\n", digest, mixDigest)
}