Introducing ethash

This commit is contained in:
Matthew Wampler-Doty
2015-02-28 14:58:37 -05:00
parent 080823bdee
commit de9f79133f
52 changed files with 17425 additions and 70 deletions

View File

@ -44,7 +44,7 @@ func (dag *Dagger) Find(obj *big.Int, resChan chan int64) {
resChan <- 0
}
func (dag *Dagger) Search(hash, diff *big.Int) *big.Int {
func (dag *Dagger) Search(hash, diff *big.Int) ([]byte, []byte, []byte) {
// TODO fix multi threading. Somehow it results in the wrong nonce
amountOfRoutines := 1
@ -69,7 +69,7 @@ func (dag *Dagger) Search(hash, diff *big.Int) *big.Int {
}
}
return big.NewInt(res)
return big.NewInt(res).Bytes(), nil, nil
}
func (dag *Dagger) Verify(hash, diff, nonce *big.Int) bool {