diff --git a/rpc/jsonrpc/types/chainsvrwscmds.go b/rpc/jsonrpc/types/chainsvrwscmds.go index a1c81d69..24d78b75 100644 --- a/rpc/jsonrpc/types/chainsvrwscmds.go +++ b/rpc/jsonrpc/types/chainsvrwscmds.go @@ -111,17 +111,6 @@ func NewNotifyNewTicketsCmd() *NotifyNewTicketsCmd { return &NotifyNewTicketsCmd{} } -// NotifyStakeDifficultyCmd is a type handling custom marshaling and -// unmarshaling of notifystakedifficulty JSON websocket extension -// commands. -type NotifyStakeDifficultyCmd struct { -} - -// NewNotifyStakeDifficultyCmd creates a new NotifyStakeDifficultyCmd. -func NewNotifyStakeDifficultyCmd() *NotifyStakeDifficultyCmd { - return &NotifyStakeDifficultyCmd{} -} - // RebroadcastMissedCmd is a type handling custom marshaling and // unmarshaling of rebroadcastmissed JSON RPC commands. type RebroadcastMissedCmd struct{} @@ -228,12 +217,8 @@ func init() { dcrjson.MustRegister(Method("notifytspend"), (*NotifyTSpendCmd)(nil), flags) dcrjson.MustRegister(Method("notifynewtransactions"), (*NotifyNewTransactionsCmd)(nil), flags) dcrjson.MustRegister(Method("notifynewtickets"), (*NotifyNewTicketsCmd)(nil), flags) - dcrjson.MustRegister(Method("notifyspentandmissedtickets"), - (*NotifySpentAndMissedTicketsCmd)(nil), flags) - dcrjson.MustRegister(Method("notifystakedifficulty"), - (*NotifyStakeDifficultyCmd)(nil), flags) - dcrjson.MustRegister(Method("notifywinningtickets"), - (*NotifyWinningTicketsCmd)(nil), flags) + dcrjson.MustRegister(Method("notifyspentandmissedtickets"), (*NotifySpentAndMissedTicketsCmd)(nil), flags) + dcrjson.MustRegister(Method("notifywinningtickets"), (*NotifyWinningTicketsCmd)(nil), flags) dcrjson.MustRegister(Method("rebroadcastmissed"), (*RebroadcastMissedCmd)(nil), flags) dcrjson.MustRegister(Method("rebroadcastwinners"), (*RebroadcastWinnersCmd)(nil), flags) dcrjson.MustRegister(Method("session"), (*SessionCmd)(nil), flags) diff --git a/rpc/jsonrpc/types/chainsvrwscmds_test.go b/rpc/jsonrpc/types/chainsvrwscmds_test.go index 957adfb9..0ad900ff 100644 --- a/rpc/jsonrpc/types/chainsvrwscmds_test.go +++ b/rpc/jsonrpc/types/chainsvrwscmds_test.go @@ -74,17 +74,6 @@ func TestChainSvrWsCmds(t *testing.T) { marshalled: `{"jsonrpc":"1.0","method":"notifynewtickets","params":[],"id":1}`, unmarshalled: &NotifyNewTicketsCmd{}, }, - { - name: "notifystakedifficulty", - newCmd: func() (interface{}, error) { - return dcrjson.NewCmd(Method("notifystakedifficulty")) - }, - staticCmd: func() interface{} { - return NewNotifyStakeDifficultyCmd() - }, - marshalled: `{"jsonrpc":"1.0","method":"notifystakedifficulty","params":[],"id":1}`, - unmarshalled: &NotifyStakeDifficultyCmd{}, - }, { name: "notifyblocks", newCmd: func() (interface{}, error) { diff --git a/rpc/jsonrpc/types/chainsvrwsntfns.go b/rpc/jsonrpc/types/chainsvrwsntfns.go index ffceed86..074be7f3 100644 --- a/rpc/jsonrpc/types/chainsvrwsntfns.go +++ b/rpc/jsonrpc/types/chainsvrwsntfns.go @@ -53,10 +53,6 @@ const ( // spentandmissedtickets notification. SpentAndMissedTicketsNtfnMethod Method = "spentandmissedtickets" - // StakeDifficultyNtfnMethod is the method of the daemon stakedifficulty - // notification. - StakeDifficultyNtfnMethod Method = "stakedifficulty" - // WinningTicketsNtfnMethod is the method of the daemon winningtickets // notification. WinningTicketsNtfnMethod Method = "winningtickets" @@ -177,23 +173,6 @@ func NewSpentAndMissedTicketsNtfn(hash string, height int32, stakeDiff int64, ti } } -// StakeDifficultyNtfn is a type handling custom marshaling and -// unmarshaling of stakedifficulty JSON websocket notifications. -type StakeDifficultyNtfn struct { - BlockHash string - BlockHeight int32 - StakeDiff int64 -} - -// NewStakeDifficultyNtfn creates a new StakeDifficultyNtfn. -func NewStakeDifficultyNtfn(hash string, height int32, stakeDiff int64) *StakeDifficultyNtfn { - return &StakeDifficultyNtfn{ - BlockHash: hash, - BlockHeight: height, - StakeDiff: stakeDiff, - } -} - // TxAcceptedNtfn defines the txaccepted JSON-RPC notification. type TxAcceptedNtfn struct { TxID string `json:"txid"` @@ -266,6 +245,5 @@ func init() { dcrjson.MustRegister(TxAcceptedVerboseNtfnMethod, (*TxAcceptedVerboseNtfn)(nil), flags) dcrjson.MustRegister(RelevantTxAcceptedNtfnMethod, (*RelevantTxAcceptedNtfn)(nil), flags) dcrjson.MustRegister(SpentAndMissedTicketsNtfnMethod, (*SpentAndMissedTicketsNtfn)(nil), flags) - dcrjson.MustRegister(StakeDifficultyNtfnMethod, (*StakeDifficultyNtfn)(nil), flags) dcrjson.MustRegister(WinningTicketsNtfnMethod, (*WinningTicketsNtfn)(nil), flags) }