@@ -72,24 +72,31 @@ protected virtual JToken GetVersion(JArray _params)
72
72
json [ "tcpport" ] = localNode . ListenerTcpPort ;
73
73
json [ "nonce" ] = LocalNode . Nonce ;
74
74
json [ "useragent" ] = LocalNode . UserAgent ;
75
- json [ "protocol" ] = new JObject ( ) ;
76
- json [ "protocol" ] [ "addressversion" ] = system . Settings . AddressVersion ;
77
- json [ "protocol" ] [ "network" ] = system . Settings . Network ;
78
- json [ "protocol" ] [ "validatorscount" ] = system . Settings . ValidatorsCount ;
79
- json [ "protocol" ] [ "msperblock" ] = system . Settings . MillisecondsPerBlock ;
80
- json [ "protocol" ] [ "maxtraceableblocks" ] = system . Settings . MaxTraceableBlocks ;
81
- json [ "protocol" ] [ "maxvaliduntilblockincrement" ] = system . Settings . MaxValidUntilBlockIncrement ;
82
- json [ "protocol" ] [ "maxtransactionsperblock" ] = system . Settings . MaxTransactionsPerBlock ;
83
- json [ "protocol" ] [ "memorypoolmaxtransactions" ] = system . Settings . MemoryPoolMaxTransactions ;
84
- json [ "protocol" ] [ "initialgasdistribution" ] = system . Settings . InitialGasDistribution ;
85
- json [ "protocol" ] [ "hardforks" ] = new JArray ( system . Settings . Hardforks . Select ( hf =>
75
+ // rpc settings
76
+ JObject rpc = new ( ) ;
77
+ rpc [ "maxiteratorresultitems" ] = settings . MaxIteratorResultItems ;
78
+ rpc [ "sessionenabled" ] = settings . SessionEnabled ;
79
+ // protocol settings
80
+ JObject protocol = new ( ) ;
81
+ protocol [ "addressversion" ] = system . Settings . AddressVersion ;
82
+ protocol [ "network" ] = system . Settings . Network ;
83
+ protocol [ "validatorscount" ] = system . Settings . ValidatorsCount ;
84
+ protocol [ "msperblock" ] = system . Settings . MillisecondsPerBlock ;
85
+ protocol [ "maxtraceableblocks" ] = system . Settings . MaxTraceableBlocks ;
86
+ protocol [ "maxvaliduntilblockincrement" ] = system . Settings . MaxValidUntilBlockIncrement ;
87
+ protocol [ "maxtransactionsperblock" ] = system . Settings . MaxTransactionsPerBlock ;
88
+ protocol [ "memorypoolmaxtransactions" ] = system . Settings . MemoryPoolMaxTransactions ;
89
+ protocol [ "initialgasdistribution" ] = system . Settings . InitialGasDistribution ;
90
+ protocol [ "hardforks" ] = new JArray ( system . Settings . Hardforks . Select ( hf =>
86
91
{
87
92
JObject forkJson = new ( ) ;
88
93
// Strip "HF_" prefix.
89
94
forkJson [ "name" ] = StripPrefix ( hf . Key . ToString ( ) , "HF_" ) ;
90
95
forkJson [ "blockheight" ] = hf . Value ;
91
96
return forkJson ;
92
97
} ) ) ;
98
+ json [ "rpc" ] = rpc ;
99
+ json [ "protocol" ] = protocol ;
93
100
return json ;
94
101
}
95
102
0 commit comments