rpc/jsonrpc/types: Remove v1 getcfilter{,header}.
This removes the deprecated types for the v1 getcfilter and getcfilterheader methods along with their tests. This is part of the overall removal of deprecated v1 cfilters.
This commit is contained in:
parent
d1888af4e5
commit
941ec8402d
@ -460,36 +460,6 @@ func NewGetBlockSubsidyCmd(height int64, voters uint16) *GetBlockSubsidyCmd {
|
||||
}
|
||||
}
|
||||
|
||||
// GetCFilterCmd defines the getcfilter JSON-RPC command.
|
||||
type GetCFilterCmd struct {
|
||||
Hash string
|
||||
FilterType string
|
||||
}
|
||||
|
||||
// NewGetCFilterCmd returns a new instance which can be used to issue a
|
||||
// getcfilter JSON-RPC command.
|
||||
func NewGetCFilterCmd(hash string, filterType string) *GetCFilterCmd {
|
||||
return &GetCFilterCmd{
|
||||
Hash: hash,
|
||||
FilterType: filterType,
|
||||
}
|
||||
}
|
||||
|
||||
// GetCFilterHeaderCmd defines the getcfilterheader JSON-RPC command.
|
||||
type GetCFilterHeaderCmd struct {
|
||||
Hash string
|
||||
FilterType string
|
||||
}
|
||||
|
||||
// NewGetCFilterHeaderCmd returns a new instance which can be used to issue a
|
||||
// getcfilterheader JSON-RPC command.
|
||||
func NewGetCFilterHeaderCmd(hash string, filterType string) *GetCFilterHeaderCmd {
|
||||
return &GetCFilterHeaderCmd{
|
||||
Hash: hash,
|
||||
FilterType: filterType,
|
||||
}
|
||||
}
|
||||
|
||||
// GetCFilterV2Cmd defines the getcfilterv2 JSON-RPC command.
|
||||
type GetCFilterV2Cmd struct {
|
||||
BlockHash string
|
||||
@ -1180,8 +1150,6 @@ func init() {
|
||||
dcrjson.MustRegister(Method("getblockhash"), (*GetBlockHashCmd)(nil), flags)
|
||||
dcrjson.MustRegister(Method("getblockheader"), (*GetBlockHeaderCmd)(nil), flags)
|
||||
dcrjson.MustRegister(Method("getblocksubsidy"), (*GetBlockSubsidyCmd)(nil), flags)
|
||||
dcrjson.MustRegister(Method("getcfilter"), (*GetCFilterCmd)(nil), flags)
|
||||
dcrjson.MustRegister(Method("getcfilterheader"), (*GetCFilterHeaderCmd)(nil), flags)
|
||||
dcrjson.MustRegister(Method("getcfilterv2"), (*GetCFilterV2Cmd)(nil), flags)
|
||||
dcrjson.MustRegister(Method("getchaintips"), (*GetChainTipsCmd)(nil), flags)
|
||||
dcrjson.MustRegister(Method("getcoinsupply"), (*GetCoinSupplyCmd)(nil), flags)
|
||||
|
||||
@ -341,34 +341,6 @@ func TestChainSvrCmds(t *testing.T) {
|
||||
Voters: 256,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getcfilter",
|
||||
newCmd: func() (interface{}, error) {
|
||||
return dcrjson.NewCmd(Method("getcfilter"), "123", "extended")
|
||||
},
|
||||
staticCmd: func() interface{} {
|
||||
return NewGetCFilterCmd("123", "extended")
|
||||
},
|
||||
marshalled: `{"jsonrpc":"1.0","method":"getcfilter","params":["123","extended"],"id":1}`,
|
||||
unmarshalled: &GetCFilterCmd{
|
||||
Hash: "123",
|
||||
FilterType: "extended",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getcfilterheader",
|
||||
newCmd: func() (interface{}, error) {
|
||||
return dcrjson.NewCmd(Method("getcfilterheader"), "123", "extended")
|
||||
},
|
||||
staticCmd: func() interface{} {
|
||||
return NewGetCFilterHeaderCmd("123", "extended")
|
||||
},
|
||||
marshalled: `{"jsonrpc":"1.0","method":"getcfilterheader","params":["123","extended"],"id":1}`,
|
||||
unmarshalled: &GetCFilterHeaderCmd{
|
||||
Hash: "123",
|
||||
FilterType: "extended",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getcfilterv2",
|
||||
newCmd: func() (interface{}, error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user