From ddd774d041d2277287b0d375c57841b2c8a19c1c Mon Sep 17 00:00:00 2001 From: duggavo <> Date: Tue, 16 May 2023 22:00:48 +0200 Subject: [PATCH] Fix calc_pow --- rpc/daemon/jsonrpc.go | 6 +++--- rpc/daemon/types.go | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/rpc/daemon/jsonrpc.go b/rpc/daemon/jsonrpc.go index b291163..b590cb9 100644 --- a/rpc/daemon/jsonrpc.go +++ b/rpc/daemon/jsonrpc.go @@ -389,12 +389,12 @@ func (c *Client) SyncInfo(ctx context.Context) (*SyncInfoResult, error) { return resp, nil } -func (c *Client) CalcPow(ctx context.Context, params CalcPowParameters) (*CalcPowResult, error) { - resp := &CalcPowResult{} +func (c *Client) CalcPow(ctx context.Context, params CalcPowParameters) (string, error) { + var resp string err := c.JSONRPC(ctx, methodCalcPow, params, resp) if err != nil { - return nil, fmt.Errorf("jsonrpc: %w", err) + return "", fmt.Errorf("jsonrpc: %w", err) } return resp, nil diff --git a/rpc/daemon/types.go b/rpc/daemon/types.go index f0f53d3..7a90fd1 100644 --- a/rpc/daemon/types.go +++ b/rpc/daemon/types.go @@ -928,10 +928,6 @@ type CalcPowParameters struct { SeedHash string `json:"seed_hash"` } -type CalcPowResult struct { - Result string `json:"result"` -} - type SubmitBlockResult struct { Status string `json:"status"` }