From 7e1c44369ce96a9a7af2d621f2cb1352adb1f665 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Wed, 15 Jan 2014 21:51:21 +0000 Subject: [PATCH] Adapt to btcjson api changes. Add placeholder help text for all the json types that btcws adds. Jrick will fill them in when he adds documentation. --- cmds.go | 39 ++++++++++++++++++++++++++------------- notifications.go | 27 ++++++++++++++++++--------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/cmds.go b/cmds.go index a535568c..dc304d44 100644 --- a/cmds.go +++ b/cmds.go @@ -13,19 +13,32 @@ import ( ) func init() { - btcjson.RegisterCustomCmd("createencryptedwallet", parseCreateEncryptedWalletCmd) - btcjson.RegisterCustomCmd("exportwatchingwallet", parseExportWatchingWalletCmd) - btcjson.RegisterCustomCmd("getaddressbalance", parseGetAddressBalanceCmd) - btcjson.RegisterCustomCmd("getbestblock", parseGetBestBlockCmd) - btcjson.RegisterCustomCmd("getcurrentnet", parseGetCurrentNetCmd) - btcjson.RegisterCustomCmd("getunconfirmedbalance", parseGetUnconfirmedBalanceCmd) - btcjson.RegisterCustomCmd("listaddresstransactions", parseListAddressTransactionsCmd) - btcjson.RegisterCustomCmd("listalltransactions", parseListAllTransactionsCmd) - btcjson.RegisterCustomCmd("notifyblocks", parseNotifyBlocksCmd) - btcjson.RegisterCustomCmd("notifynewtxs", parseNotifyNewTXsCmd) - btcjson.RegisterCustomCmd("notifyspent", parseNotifySpentCmd) - btcjson.RegisterCustomCmd("rescan", parseRescanCmd) - btcjson.RegisterCustomCmd("walletislocked", parseWalletIsLockedCmd) + btcjson.RegisterCustomCmd("createencryptedwallet", + parseCreateEncryptedWalletCmd, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("exportwatchingwallet", + parseExportWatchingWalletCmd, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("getaddressbalance", + parseGetAddressBalanceCmd, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("getbestblock", parseGetBestBlockCmd, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("getcurrentnet", parseGetCurrentNetCmd, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("getunconfirmedbalance", + parseGetUnconfirmedBalanceCmd, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("listaddresstransactions", + parseListAddressTransactionsCmd, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("listalltransactions", + parseListAllTransactionsCmd, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("notifyblocks", parseNotifyBlocksCmd, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("notifynewtxs", parseNotifyNewTXsCmd, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("notifyspent", parseNotifySpentCmd, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("rescan", parseRescanCmd, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd("walletislocked", parseWalletIsLockedCmd, + `TODO(jrick) fillmein`) } // GetCurrentNetCmd is a type handling custom marshaling and diff --git a/notifications.go b/notifications.go index 3fd4c7cb..59b0c2bb 100644 --- a/notifications.go +++ b/notifications.go @@ -57,15 +57,24 @@ const ( // Register notifications with btcjson. func init() { - btcjson.RegisterCustomCmd(AccountBalanceNtfnMethod, parseAccountBalanceNtfn) - btcjson.RegisterCustomCmd(BlockConnectedNtfnMethod, parseBlockConnectedNtfn) - btcjson.RegisterCustomCmd(BlockDisconnectedNtfnMethod, parseBlockDisconnectedNtfn) - btcjson.RegisterCustomCmd(BtcdConnectedNtfnMethod, parseBtcdConnectedNtfn) - btcjson.RegisterCustomCmd(ProcessedTxNtfnMethod, parseProcessedTxNtfn) - btcjson.RegisterCustomCmd(TxMinedNtfnMethod, parseTxMinedNtfn) - btcjson.RegisterCustomCmd(TxSpentNtfnMethod, parseTxSpentNtfn) - btcjson.RegisterCustomCmd(TxNtfnMethod, parseTxNtfn) - btcjson.RegisterCustomCmd(WalletLockStateNtfnMethod, parseWalletLockStateNtfn) + btcjson.RegisterCustomCmd(AccountBalanceNtfnMethod, + parseAccountBalanceNtfn, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(BlockConnectedNtfnMethod, + parseBlockConnectedNtfn, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(BlockDisconnectedNtfnMethod, + parseBlockDisconnectedNtfn, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(BtcdConnectedNtfnMethod, + parseBtcdConnectedNtfn, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(ProcessedTxNtfnMethod, + parseProcessedTxNtfn, `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(TxMinedNtfnMethod, parseTxMinedNtfn, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(TxSpentNtfnMethod, parseTxSpentNtfn, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(TxNtfnMethod, parseTxNtfn, + `TODO(jrick) fillmein`) + btcjson.RegisterCustomCmd(WalletLockStateNtfnMethod, + parseWalletLockStateNtfn, `TODO(jrick) fillmein`) } // AccountBalanceNtfn is a type handling custom marshaling and