Commit 699c4a6c authored by muXxer's avatar muXxer

Ported code to iota.go

parent d4f3e6d8
......@@ -10,7 +10,8 @@ import (
"gitlab.com/powsrv.io/go/api"
"github.com/iotaledger/giota"
"github.com/iotaledger/iota.go/trinary"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
......@@ -158,7 +159,7 @@ func (client *PowClient) handleConnection() {
}
// PowFunc does the POW
func (client *PowClient) PowFunc(trytes giota.Trytes, minWeightMagnitude int) (result giota.Trytes, Error error) {
func (client *PowClient) PowFunc(trytes trinary.Trytes, minWeightMagnitude int, parallelism ...int) (result trinary.Trytes, Error error) {
if client.connectionError != nil {
return "", client.connectionError
......@@ -188,7 +189,7 @@ func (client *PowClient) PowFunc(trytes giota.Trytes, minWeightMagnitude int) (r
case powResponse := <-pendingPowRequest.powResponseChan:
// Got response
close(pendingPowRequest.powResponseChan)
result, err := giota.ToTrytes(powResponse.Nonce)
result, err := trinary.NewTrytes(powResponse.Nonce)
if err != nil {
return "", err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment