diff --git a/rpc/jsonrpc/types/chainsvrwscmds.go b/rpc/jsonrpc/types/chainsvrwscmds.go index 2107c7a464..30d3045e0b 100644 --- a/rpc/jsonrpc/types/chainsvrwscmds.go +++ b/rpc/jsonrpc/types/chainsvrwscmds.go @@ -89,17 +89,6 @@ func NewNotifyWinningTicketsCmd() *NotifyWinningTicketsCmd { return &NotifyWinningTicketsCmd{} } -// NotifySpentAndMissedTicketsCmd is a type handling custom marshaling and -// unmarshaling of notifyspentandmissedtickets JSON websocket extension -// commands. -type NotifySpentAndMissedTicketsCmd struct { -} - -// NewNotifySpentAndMissedTicketsCmd creates a new NotifySpentAndMissedTicketsCmd. -func NewNotifySpentAndMissedTicketsCmd() *NotifySpentAndMissedTicketsCmd { - return &NotifySpentAndMissedTicketsCmd{} -} - // NotifyNewTicketsCmd is a type handling custom marshaling and // unmarshaling of notifynewtickets JSON websocket extension // commands. @@ -207,7 +196,6 @@ 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("notifywinningtickets"), (*NotifyWinningTicketsCmd)(nil), flags) dcrjson.MustRegister(Method("rebroadcastwinners"), (*RebroadcastWinnersCmd)(nil), flags) dcrjson.MustRegister(Method("session"), (*SessionCmd)(nil), flags) diff --git a/rpc/jsonrpc/types/chainsvrwsntfns.go b/rpc/jsonrpc/types/chainsvrwsntfns.go index ab2b999417..94c325e87c 100644 --- a/rpc/jsonrpc/types/chainsvrwsntfns.go +++ b/rpc/jsonrpc/types/chainsvrwsntfns.go @@ -49,10 +49,6 @@ const ( // transaction was accepted by the mempool. RelevantTxAcceptedNtfnMethod Method = "relevanttxaccepted" - // SpentAndMissedTicketsNtfnMethod is the method of the daemon - // spentandmissedtickets notification. - SpentAndMissedTicketsNtfnMethod Method = "spentandmissedtickets" - // WinningTicketsNtfnMethod is the method of the daemon winningtickets // notification. WinningTicketsNtfnMethod Method = "winningtickets" @@ -154,25 +150,6 @@ func NewReorganizationNtfn(oldHash string, oldHeight int32, newHash string, } } -// SpentAndMissedTicketsNtfn is a type handling custom marshaling and -// unmarshaling of spentandmissedtickets JSON websocket notifications. -type SpentAndMissedTicketsNtfn struct { - Hash string - Height int32 - StakeDiff int64 - Tickets map[string]string -} - -// NewSpentAndMissedTicketsNtfn creates a new SpentAndMissedTicketsNtfn. -func NewSpentAndMissedTicketsNtfn(hash string, height int32, stakeDiff int64, tickets map[string]string) *SpentAndMissedTicketsNtfn { - return &SpentAndMissedTicketsNtfn{ - Hash: hash, - Height: height, - StakeDiff: stakeDiff, - Tickets: tickets, - } -} - // TxAcceptedNtfn defines the txaccepted JSON-RPC notification. type TxAcceptedNtfn struct { TxID string `json:"txid"` @@ -244,6 +221,5 @@ func init() { dcrjson.MustRegister(TxAcceptedNtfnMethod, (*TxAcceptedNtfn)(nil), flags) dcrjson.MustRegister(TxAcceptedVerboseNtfnMethod, (*TxAcceptedVerboseNtfn)(nil), flags) dcrjson.MustRegister(RelevantTxAcceptedNtfnMethod, (*RelevantTxAcceptedNtfn)(nil), flags) - dcrjson.MustRegister(SpentAndMissedTicketsNtfnMethod, (*SpentAndMissedTicketsNtfn)(nil), flags) dcrjson.MustRegister(WinningTicketsNtfnMethod, (*WinningTicketsNtfn)(nil), flags) } diff --git a/rpc/jsonrpc/types/chainsvrwsntfns_test.go b/rpc/jsonrpc/types/chainsvrwsntfns_test.go index c3d74006d4..2f1f23ab26 100644 --- a/rpc/jsonrpc/types/chainsvrwsntfns_test.go +++ b/rpc/jsonrpc/types/chainsvrwsntfns_test.go @@ -85,22 +85,6 @@ func TestChainSvrWsNtfns(t *testing.T) { Transaction: "001122", }, }, - { - name: "spentandmissedtickets", - newNtfn: func() (interface{}, error) { - return dcrjson.NewCmd(Method("spentandmissedtickets"), "123", 100, 3, map[string]string{"a": "b"}) - }, - staticNtfn: func() interface{} { - return NewSpentAndMissedTicketsNtfn("123", 100, 3, map[string]string{"a": "b"}) - }, - marshalled: `{"jsonrpc":"1.0","method":"spentandmissedtickets","params":["123",100,3,{"a":"b"}],"id":null}`, - unmarshalled: &SpentAndMissedTicketsNtfn{ - Hash: "123", - Height: 100, - StakeDiff: 3, - Tickets: map[string]string{"a": "b"}, - }, - }, { name: "txaccepted", newNtfn: func() (interface{}, error) {