mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 06:06:49 +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"`
|
||||
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"`
|
||||
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"`
|
||||
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"`
|
||||
|
3
doc.go
3
doc.go
@ -52,9 +52,6 @@ Application Options:
|
||||
--rpcmaxclients= Max number of RPC clients for standard connections
|
||||
(10)
|
||||
--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
|
||||
is disabled by default if no rpcuser/rpcpass or
|
||||
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
|
||||
// valid request id, therefore such requests are not notifications.
|
||||
//
|
||||
// Kaspad does not respond to any request without and "id" or "id":null,
|
||||
// regardless the indicated JSON-RPC protocol version unless RPC quirks
|
||||
// are enabled. With RPC quirks enabled, such requests will be responded
|
||||
// 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 == "") {
|
||||
// Kaspad does not respond to any request without an "id" or "id":null,
|
||||
// regardless the indicated JSON-RPC protocol version.
|
||||
if request.ID == nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -990,14 +990,9 @@ out:
|
||||
// must not be responded to. JSON-RPC 2.0 permits the null value as a
|
||||
// valid request id, therefore such requests are not notifications.
|
||||
//
|
||||
// Kaspad does not respond to any request without and "id" or "id":null,
|
||||
// regardless the indicated JSON-RPC protocol version unless RPC quirks
|
||||
// are enabled. With RPC quirks enabled, such requests will be responded
|
||||
// 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 == "") {
|
||||
// Kaspad does not respond to any request without an "id" or "id":null,
|
||||
// regardless the indicated JSON-RPC protocol version.
|
||||
if request.ID == nil {
|
||||
if !c.authenticated {
|
||||
break out
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user