From 3208b7ae75bda7ca4733cbe0bdefba642218a6ce Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Fri, 11 Apr 2014 14:00:22 -0500 Subject: [PATCH] Update for btcjson RegisterCustomCmd API change. --- cmds.go | 32 ++++++++++++++++---------------- notifications.go | 27 +++++++++++++-------------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/cmds.go b/cmds.go index 8303d1ec..d959315a 100644 --- a/cmds.go +++ b/cmds.go @@ -21,38 +21,38 @@ first command sent or you will be disconnected.` ) func init() { - btcjson.RegisterCustomCmd("authenticate", parseAuthenticateCmd, + btcjson.RegisterCustomCmd("authenticate", parseAuthenticateCmd, nil, authenticateHelp) btcjson.RegisterCustomCmd("createencryptedwallet", - parseCreateEncryptedWalletCmd, `TODO(jrick) fillmein`) + parseCreateEncryptedWalletCmd, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("exportwatchingwallet", - parseExportWatchingWalletCmd, `TODO(jrick) fillmein`) + parseExportWatchingWalletCmd, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("getaddressbalance", - parseGetAddressBalanceCmd, `TODO(jrick) fillmein`) - btcjson.RegisterCustomCmd("getbestblock", parseGetBestBlockCmd, + parseGetAddressBalanceCmd, nil, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("getbestblock", parseGetBestBlockCmd, nil, `TODO(jrick) fillmein`) - btcjson.RegisterCustomCmd("getcurrentnet", parseGetCurrentNetCmd, + btcjson.RegisterCustomCmd("getcurrentnet", parseGetCurrentNetCmd, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("getunconfirmedbalance", - parseGetUnconfirmedBalanceCmd, `TODO(jrick) fillmein`) + parseGetUnconfirmedBalanceCmd, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("listaddresstransactions", - parseListAddressTransactionsCmd, `TODO(jrick) fillmein`) + parseListAddressTransactionsCmd, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("listalltransactions", - parseListAllTransactionsCmd, `TODO(jrick) fillmein`) - btcjson.RegisterCustomCmd("notifyblocks", parseNotifyBlocksCmd, + parseListAllTransactionsCmd, nil, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("notifyblocks", parseNotifyBlocksCmd, nil, `TODO(jrick) fillmein`) - btcjson.RegisterCustomCmd("notifynewtxs", parseNotifyNewTXsCmd, + btcjson.RegisterCustomCmd("notifynewtxs", parseNotifyNewTXsCmd, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("notifyallnewtxs", parseNotifyAllNewTXsCmd, - `TODO(flam) fillmein`) + nil, `TODO(flam) fillmein`) btcjson.RegisterCustomCmd("notifyspent", parseNotifySpentCmd, - `TODO(jrick) fillmein`) + nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("recoveraddresses", parseRecoverAddressesCmd, - `TODO(jrick) fillmein`) + nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("rescan", parseRescanCmd, - `TODO(jrick) fillmein`) + nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd("walletislocked", parseWalletIsLockedCmd, - `TODO(jrick) fillmein`) + nil, `TODO(jrick) fillmein`) } // AuthenticateCmd is a type handling custom marshaling and diff --git a/notifications.go b/notifications.go index 3a2ad102..b57d1fa0 100644 --- a/notifications.go +++ b/notifications.go @@ -65,28 +65,27 @@ const ( // Register notifications with btcjson. func init() { btcjson.RegisterCustomCmd(AccountBalanceNtfnMethod, - parseAccountBalanceNtfn, `TODO(jrick) fillmein`) + parseAccountBalanceNtfn, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd(BlockConnectedNtfnMethod, - parseBlockConnectedNtfn, `TODO(jrick) fillmein`) + parseBlockConnectedNtfn, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd(BlockDisconnectedNtfnMethod, - parseBlockDisconnectedNtfn, `TODO(jrick) fillmein`) + parseBlockDisconnectedNtfn, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd(BtcdConnectedNtfnMethod, - parseBtcdConnectedNtfn, `TODO(jrick) fillmein`) + parseBtcdConnectedNtfn, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd(RecvTxNtfnMethod, - parseRecvTxNtfn, `TODO(jrick) fillmein`) + parseRecvTxNtfn, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd(RescanProgressNtfnMethod, - parseRescanProgressNtfn, `TODO(jrick) fillmein`) - + parseRescanProgressNtfn, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd(RedeemingTxNtfnMethod, parseRedeemingTxNtfn, - `TODO(jrick) fillmein`) - btcjson.RegisterCustomCmd(TxNtfnMethod, parseTxNtfn, + nil, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(TxNtfnMethod, parseTxNtfn, nil, `TODO(jrick) fillmein`) btcjson.RegisterCustomCmd(WalletLockStateNtfnMethod, - parseWalletLockStateNtfn, `TODO(jrick) fillmein`) - btcjson.RegisterCustomCmd(AllTxNtfnMethod, - parseAllTxNtfn, `TODO(flam) fillmein`) - btcjson.RegisterCustomCmd(AllVerboseTxNtfnMethod, - parseAllVerboseTxNtfn, `TODO(flam) fillmein`) + parseWalletLockStateNtfn, nil, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(AllTxNtfnMethod, parseAllTxNtfn, nil, + `TODO(flam) fillmein`) + btcjson.RegisterCustomCmd(AllVerboseTxNtfnMethod, parseAllVerboseTxNtfn, + nil, `TODO(flam) fillmein`) } // BlockDetails describes details of a tx in a block.