mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-25 15:10:33 +01:00
This changes notifications to JSON-RPC Requests, rather than Responses, that also satisify the btcjson.Cmd interface and are registered with btcjson's parser. This prevents issues where JSON-RPC Response IDs clash due to a client using the same ID as what an old notification used. As this changes the API, and thus, requires notification handlers to be modified, the remaining missing notifications used by btcwallet have been implemented. Applications parsing these notifications, such as btcgui, can now use a common handler function signature for all notifications. Test coverage for all notifications has been added (excluding testing for badly-marshaled notifications with wrong numbers of parameters, or wrong types). Fixes #2.
107 lines
8.2 KiB
Text
107 lines
8.2 KiB
Text
|
|
github.com/conformal/btcws/cmds.go init 100.00% (10/10)
|
|
github.com/conformal/btcws/notifications.go init 100.00% (7/7)
|
|
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.MarshalJSON 100.00% (2/2)
|
|
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.MarshalJSON 100.00% (2/2)
|
|
github.com/conformal/btcws/notifications.go TxMinedNtfn.MarshalJSON 100.00% (2/2)
|
|
github.com/conformal/btcws/notifications.go TxNtfn.MarshalJSON 100.00% (2/2)
|
|
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.MarshalJSON 100.00% (2/2)
|
|
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.MarshalJSON 100.00% (2/2)
|
|
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.MarshalJSON 100.00% (2/2)
|
|
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Method 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Method 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.Id 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go NewWalletLockStateNtfn 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go TxNtfn.Method 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go TxNtfn.Id 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go NewTxNtfn 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go TxMinedNtfn.Method 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go NewTxMinedNtfn 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go TxMinedNtfn.Id 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Id 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go NewBtcdConnectedNtfn 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.Method 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.Id 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go NewBlockDisconnectedNtfn 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.Method 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.Id 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go NewBlockConnectedNtfn 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.Id 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go NewAccountBalanceNtfn 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.Method 100.00% (1/1)
|
|
github.com/conformal/btcws/notifications.go TxNtfn.UnmarshalJSON 72.73% (8/11)
|
|
github.com/conformal/btcws/notifications.go AccountBalanceNtfn.UnmarshalJSON 72.73% (8/11)
|
|
github.com/conformal/btcws/notifications.go WalletLockStateNtfn.UnmarshalJSON 72.73% (8/11)
|
|
github.com/conformal/btcws/notifications.go BlockDisconnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
|
github.com/conformal/btcws/notifications.go TxMinedNtfn.UnmarshalJSON 72.73% (8/11)
|
|
github.com/conformal/btcws/notifications.go BlockConnectedNtfn.UnmarshalJSON 72.73% (8/11)
|
|
github.com/conformal/btcws/notifications.go parseTxMinedNtfn 70.00% (14/20)
|
|
github.com/conformal/btcws/notifications.go parseAccountBalanceNtfn 64.29% (9/14)
|
|
github.com/conformal/btcws/notifications.go parseTxNtfn 63.64% (7/11)
|
|
github.com/conformal/btcws/notifications.go parseWalletLockStateNtfn 63.64% (7/11)
|
|
github.com/conformal/btcws/notifications.go parseBlockConnectedNtfn 63.64% (7/11)
|
|
github.com/conformal/btcws/notifications.go parseBlockDisconnectedNtfn 63.64% (7/11)
|
|
github.com/conformal/btcws/notifications.go parseBtcdConnectedNtfn 62.50% (5/8)
|
|
github.com/conformal/btcws/notifications.go BtcdConnectedNtfn.UnmarshalJSON 45.45% (5/11)
|
|
github.com/conformal/btcws/cmds.go parseRescanCmd 0.00% (0/18)
|
|
github.com/conformal/btcws/cmds.go parseNotifySpentCmd 0.00% (0/15)
|
|
github.com/conformal/btcws/cmds.go parseCreateEncryptedWalletCmd 0.00% (0/13)
|
|
github.com/conformal/btcws/cmds.go parseNotifyNewTXsCmd 0.00% (0/12)
|
|
github.com/conformal/btcws/cmds.go RescanCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go GetBalancesCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go GetBestBlockCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go parseGetAddressBalanceCmd 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go NotifySpentCmd.UnmarshalJSON 0.00% (0/11)
|
|
github.com/conformal/btcws/cmds.go parseListAllTransactionsCmd 0.00% (0/8)
|
|
github.com/conformal/btcws/cmds.go parseWalletIsLockedCmd 0.00% (0/8)
|
|
github.com/conformal/btcws/cmds.go NewRescanCmd 0.00% (0/6)
|
|
github.com/conformal/btcws/cmds.go NewListAllTransactionsCmd 0.00% (0/6)
|
|
github.com/conformal/btcws/cmds.go NewGetAddressBalanceCmd 0.00% (0/6)
|
|
github.com/conformal/btcws/cmds.go NewWalletIsLockedCmd 0.00% (0/6)
|
|
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.MarshalJSON 0.00% (0/4)
|
|
github.com/conformal/btcws/cmds.go RescanCmd.MarshalJSON 0.00% (0/4)
|
|
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.MarshalJSON 0.00% (0/4)
|
|
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.MarshalJSON 0.00% (0/4)
|
|
github.com/conformal/btcws/cmds.go parseGetBalancesCmd 0.00% (0/3)
|
|
github.com/conformal/btcws/cmds.go parseGetBestBlockCmd 0.00% (0/3)
|
|
github.com/conformal/btcws/cmds.go parseGetCurrentNetCmd 0.00% (0/3)
|
|
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.MarshalJSON 0.00% (0/2)
|
|
github.com/conformal/btcws/cmds.go GetBalancesCmd.MarshalJSON 0.00% (0/2)
|
|
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.MarshalJSON 0.00% (0/2)
|
|
github.com/conformal/btcws/cmds.go NotifySpentCmd.MarshalJSON 0.00% (0/2)
|
|
github.com/conformal/btcws/cmds.go GetBestBlockCmd.MarshalJSON 0.00% (0/2)
|
|
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.MarshalJSON 0.00% (0/2)
|
|
github.com/conformal/btcws/cmds.go NotifySpentCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NewNotifySpentCmd 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go CreateEncryptedWalletCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NewGetBalancesCmd 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NotifyNewTXsCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetBalancesCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NewNotifyNewTXsCmd 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go RescanCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go RescanCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NewGetCurrentNetCmd 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetBestBlockCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetAddressBalanceCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NewGetBestBlockCmd 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go WalletIsLockedCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetBalancesCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go GetCurrentNetCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NewCreateEncryptedWalletCmd 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go ListAllTransactionsCmd.Id 0.00% (0/1)
|
|
github.com/conformal/btcws/cmds.go NotifySpentCmd.Method 0.00% (0/1)
|
|
github.com/conformal/btcws -------------------------------------- 32.39% (161/497)
|
|
|