diff --git a/pkg/rpc/response/result/version.go b/pkg/rpc/response/result/version.go index 98d0eb00b..cb0142f08 100644 --- a/pkg/rpc/response/result/version.go +++ b/pkg/rpc/response/result/version.go @@ -31,6 +31,7 @@ type ( MaxValidUntilBlockIncrement uint32 `json:"maxvaliduntilblockincrement"` MaxTransactionsPerBlock uint16 `json:"maxtransactionsperblock"` MemoryPoolMaxTransactions int `json:"memorypoolmaxtransactions"` + ValidatorsCount byte `json:"validatorscount"` InitialGasDistribution fixedn.Fixed8 `json:"initialgasdistribution"` // StateRootInHeader is true if state root is contained in block header. StateRootInHeader bool `json:"staterootinheader,omitempty"` diff --git a/pkg/rpc/server/server.go b/pkg/rpc/server/server.go index cffbf79d5..0f03f4307 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -537,6 +537,7 @@ func (s *Server) getVersion(_ request.Params) (interface{}, *response.Error) { MaxValidUntilBlockIncrement: cfg.MaxValidUntilBlockIncrement, MaxTransactionsPerBlock: cfg.MaxTransactionsPerBlock, MemoryPoolMaxTransactions: cfg.MemPoolSize, + ValidatorsCount: byte(cfg.ValidatorsCount), InitialGasDistribution: cfg.InitialGASSupply, StateRootInHeader: cfg.StateRootInHeader, }, diff --git a/pkg/rpc/server/server_test.go b/pkg/rpc/server/server_test.go index 76ca0e202..c93aa591a 100644 --- a/pkg/rpc/server/server_test.go +++ b/pkg/rpc/server/server_test.go @@ -699,6 +699,7 @@ var rpcTestCases = map[string][]rpcTestCase{ require.EqualValues(t, cfg.MaxValidUntilBlockIncrement, resp.Protocol.MaxValidUntilBlockIncrement) require.EqualValues(t, cfg.MaxTransactionsPerBlock, resp.Protocol.MaxTransactionsPerBlock) require.EqualValues(t, cfg.MemPoolSize, resp.Protocol.MemoryPoolMaxTransactions) + require.EqualValues(t, cfg.ValidatorsCount, resp.Protocol.ValidatorsCount) require.EqualValues(t, cfg.InitialGASSupply, resp.Protocol.InitialGasDistribution) require.EqualValues(t, false, resp.Protocol.StateRootInHeader) },