diff --git a/src/RpcServer/RpcServer.Node.cs b/src/RpcServer/RpcServer.Node.cs index b28820f2f..1b08e62db 100644 --- a/src/RpcServer/RpcServer.Node.cs +++ b/src/RpcServer/RpcServer.Node.cs @@ -72,17 +72,22 @@ protected virtual JToken GetVersion(JArray _params) json["tcpport"] = localNode.ListenerTcpPort; json["nonce"] = LocalNode.Nonce; json["useragent"] = LocalNode.UserAgent; - json["protocol"] = new JObject(); - json["protocol"]["addressversion"] = system.Settings.AddressVersion; - json["protocol"]["network"] = system.Settings.Network; - json["protocol"]["validatorscount"] = system.Settings.ValidatorsCount; - json["protocol"]["msperblock"] = system.Settings.MillisecondsPerBlock; - json["protocol"]["maxtraceableblocks"] = system.Settings.MaxTraceableBlocks; - json["protocol"]["maxvaliduntilblockincrement"] = system.Settings.MaxValidUntilBlockIncrement; - json["protocol"]["maxtransactionsperblock"] = system.Settings.MaxTransactionsPerBlock; - json["protocol"]["memorypoolmaxtransactions"] = system.Settings.MemoryPoolMaxTransactions; - json["protocol"]["initialgasdistribution"] = system.Settings.InitialGasDistribution; - json["protocol"]["hardforks"] = new JArray(system.Settings.Hardforks.Select(hf => + // rpc settings + JObject rpc = new(); + rpc["maxiteratorresultitems"] = settings.MaxIteratorResultItems; + rpc["sessionenabled"] = settings.SessionEnabled; + // protocol settings + JObject protocol = new(); + protocol["addressversion"] = system.Settings.AddressVersion; + protocol["network"] = system.Settings.Network; + protocol["validatorscount"] = system.Settings.ValidatorsCount; + protocol["msperblock"] = system.Settings.MillisecondsPerBlock; + protocol["maxtraceableblocks"] = system.Settings.MaxTraceableBlocks; + protocol["maxvaliduntilblockincrement"] = system.Settings.MaxValidUntilBlockIncrement; + protocol["maxtransactionsperblock"] = system.Settings.MaxTransactionsPerBlock; + protocol["memorypoolmaxtransactions"] = system.Settings.MemoryPoolMaxTransactions; + protocol["initialgasdistribution"] = system.Settings.InitialGasDistribution; + protocol["hardforks"] = new JArray(system.Settings.Hardforks.Select(hf => { JObject forkJson = new(); // Strip "HF_" prefix. @@ -90,6 +95,8 @@ protected virtual JToken GetVersion(JArray _params) forkJson["blockheight"] = hf.Value; return forkJson; })); + json["rpc"] = rpc; + json["protocol"] = protocol; return json; }