mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-05 21:56:50 +00:00
[NOD-502] Remove RPCQuirks. (#540)
This commit is contained in:
parent
f46dec449d
commit
c25c9b25bd
@ -118,7 +118,6 @@ type Flags struct {
|
|||||||
RPCMaxClients int `long:"rpcmaxclients" description:"Max number of RPC clients for standard connections"`
|
RPCMaxClients int `long:"rpcmaxclients" description:"Max number of RPC clients for standard connections"`
|
||||||
RPCMaxWebsockets int `long:"rpcmaxwebsockets" description:"Max number of RPC websocket connections"`
|
RPCMaxWebsockets int `long:"rpcmaxwebsockets" description:"Max number of RPC websocket connections"`
|
||||||
RPCMaxConcurrentReqs int `long:"rpcmaxconcurrentreqs" description:"Max number of concurrent RPC requests that may be processed concurrently"`
|
RPCMaxConcurrentReqs int `long:"rpcmaxconcurrentreqs" description:"Max number of concurrent RPC requests that may be processed concurrently"`
|
||||||
RPCQuirks bool `long:"rpcquirks" description:"Mirror some JSON-RPC quirks of Bitcoin Core -- NOTE: Discouraged unless interoperability issues need to be worked around"`
|
|
||||||
DisableRPC bool `long:"norpc" description:"Disable built-in RPC server -- NOTE: The RPC server is disabled by default if no rpcuser/rpcpass or rpclimituser/rpclimitpass is specified"`
|
DisableRPC bool `long:"norpc" description:"Disable built-in RPC server -- NOTE: The RPC server is disabled by default if no rpcuser/rpcpass or rpclimituser/rpclimitpass is specified"`
|
||||||
DisableTLS bool `long:"notls" description:"Disable TLS for the RPC server -- NOTE: This is only allowed if the RPC server is bound to localhost"`
|
DisableTLS bool `long:"notls" description:"Disable TLS for the RPC server -- NOTE: This is only allowed if the RPC server is bound to localhost"`
|
||||||
DisableDNSSeed bool `long:"nodnsseed" description:"Disable DNS seeding for peers"`
|
DisableDNSSeed bool `long:"nodnsseed" description:"Disable DNS seeding for peers"`
|
||||||
|
3
doc.go
3
doc.go
@ -52,9 +52,6 @@ Application Options:
|
|||||||
--rpcmaxclients= Max number of RPC clients for standard connections
|
--rpcmaxclients= Max number of RPC clients for standard connections
|
||||||
(10)
|
(10)
|
||||||
--rpcmaxwebsockets= Max number of RPC websocket connections (25)
|
--rpcmaxwebsockets= Max number of RPC websocket connections (25)
|
||||||
--rpcquirks Mirror some JSON-RPC quirks of Bitcoin Core -- NOTE:
|
|
||||||
Discouraged unless interoperability issues need to
|
|
||||||
be worked around
|
|
||||||
--norpc Disable built-in RPC server -- NOTE: The RPC server
|
--norpc Disable built-in RPC server -- NOTE: The RPC server
|
||||||
is disabled by default if no rpcuser/rpcpass or
|
is disabled by default if no rpcuser/rpcpass or
|
||||||
rpclimituser/rpclimitpass is specified
|
rpclimituser/rpclimitpass is specified
|
||||||
|
@ -494,14 +494,9 @@ func (s *Server) jsonRPCRead(w http.ResponseWriter, r *http.Request, isAdmin boo
|
|||||||
// must not be responded to. JSON-RPC 2.0 permits the null value as a
|
// must not be responded to. JSON-RPC 2.0 permits the null value as a
|
||||||
// valid request id, therefore such requests are not notifications.
|
// valid request id, therefore such requests are not notifications.
|
||||||
//
|
//
|
||||||
// Kaspad does not respond to any request without and "id" or "id":null,
|
// Kaspad does not respond to any request without an "id" or "id":null,
|
||||||
// regardless the indicated JSON-RPC protocol version unless RPC quirks
|
// regardless the indicated JSON-RPC protocol version.
|
||||||
// are enabled. With RPC quirks enabled, such requests will be responded
|
if request.ID == nil {
|
||||||
// to if the reqeust does not indicate JSON-RPC version.
|
|
||||||
//
|
|
||||||
// RPC quirks can be enabled by the user to avoid compatibility issues
|
|
||||||
// with software relying on Core's behavior.
|
|
||||||
if request.ID == nil && !(config.ActiveConfig().RPCQuirks && request.JSONRPC == "") {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -990,14 +990,9 @@ out:
|
|||||||
// must not be responded to. JSON-RPC 2.0 permits the null value as a
|
// must not be responded to. JSON-RPC 2.0 permits the null value as a
|
||||||
// valid request id, therefore such requests are not notifications.
|
// valid request id, therefore such requests are not notifications.
|
||||||
//
|
//
|
||||||
// Kaspad does not respond to any request without and "id" or "id":null,
|
// Kaspad does not respond to any request without an "id" or "id":null,
|
||||||
// regardless the indicated JSON-RPC protocol version unless RPC quirks
|
// regardless the indicated JSON-RPC protocol version.
|
||||||
// are enabled. With RPC quirks enabled, such requests will be responded
|
if request.ID == nil {
|
||||||
// to if the reqeust does not indicate JSON-RPC version.
|
|
||||||
//
|
|
||||||
// RPC quirks can be enabled by the user to avoid compatibility issues
|
|
||||||
// with software relying on Core's behavior.
|
|
||||||
if request.ID == nil && !(config.ActiveConfig().RPCQuirks && request.JSONRPC == "") {
|
|
||||||
if !c.authenticated {
|
if !c.authenticated {
|
||||||
break out
|
break out
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user