From db87b9e85f8241884f205b8f692c92a92d577e16 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Tue, 11 Feb 2014 16:29:54 -0600 Subject: [PATCH] Update btcctl getwork for latest btcjson changes. --- util/btcctl/btcctl.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/util/btcctl/btcctl.go b/util/btcctl/btcctl.go index 82390f52..a8f1b133 100644 --- a/util/btcctl/btcctl.go +++ b/util/btcctl/btcctl.go @@ -77,7 +77,7 @@ var commandHandlers = map[string]*handlerData{ "getreceivedbyaddress": {1, 1, displayGeneric, []conversionHandler{nil, toInt}, makeGetReceivedByAddress, "
[minconf=1]"}, "gettransaction": {1, 1, displayJSONDump, nil, makeGetTransaction, "txid"}, "gettxoutsetinfo": {0, 0, displayJSONDump, nil, makeGetTxOutSetInfo, ""}, - "getwork": {0, 1, displayJSONDump, nil, makeGetWork, "[jsonrequestobject]"}, + "getwork": {0, 1, displayJSONDump, nil, makeGetWork, "[data]"}, "help": {0, 1, displayGeneric, nil, makeHelp, "[commandName]"}, "importprivkey": {1, 2, displayGeneric, []conversionHandler{nil, nil, toBool}, makeImportPrivKey, " [label] [rescan=true]"}, "keypoolrefill": {0, 1, displayGeneric, []conversionHandler{toInt}, makeKeyPoolRefill, "[newsize]"}, @@ -470,10 +470,7 @@ func makeGetWork(args []interface{}) (btcjson.Cmd, error) { return nil, err } if len(args) == 1 { - err = cmd.UnmarshalJSON([]byte(args[0].(string))) - if err != nil { - return nil, err - } + cmd.Data = args[0].(string) } return cmd, nil }