mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
Merge pull request #2202 from nspcc-dev/validatorscount
rpc: add validatorscount to getversion response
This commit is contained in:
commit
b4e24bef14
3 changed files with 3 additions and 0 deletions
|
@ -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"`
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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)
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue