From c042c5bb632af9592a8933ac367fb09f53ae4d50 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 25 Apr 2022 16:01:30 +0300 Subject: [PATCH] Revert "rpc: adjust `getversion` RPC response" This reverts commit 1c6afe402fb60c371490fd096f1d8abfff666d63. --- pkg/rpc/response/result/version.go | 3 ++- pkg/rpc/server/server.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/rpc/response/result/version.go b/pkg/rpc/response/result/version.go index 2dfa7122c..cb0142f08 100644 --- a/pkg/rpc/response/result/version.go +++ b/pkg/rpc/response/result/version.go @@ -2,6 +2,7 @@ package result import ( "github.com/nspcc-dev/neo-go/pkg/config/netmode" + "github.com/nspcc-dev/neo-go/pkg/encoding/fixedn" ) type ( @@ -31,7 +32,7 @@ type ( MaxTransactionsPerBlock uint16 `json:"maxtransactionsperblock"` MemoryPoolMaxTransactions int `json:"memorypoolmaxtransactions"` ValidatorsCount byte `json:"validatorscount"` - InitialGasDistribution int64 `json:"initialgasdistribution"` + 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 d0f3062a2..079b05fb7 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -551,7 +551,7 @@ func (s *Server) getVersion(_ request.Params) (interface{}, *response.Error) { MaxTransactionsPerBlock: cfg.MaxTransactionsPerBlock, MemoryPoolMaxTransactions: cfg.MemPoolSize, ValidatorsCount: byte(cfg.GetNumOfCNs(s.chain.BlockHeight())), - InitialGasDistribution: int64(cfg.InitialGASSupply), + InitialGasDistribution: cfg.InitialGASSupply, StateRootInHeader: cfg.StateRootInHeader, }, }, nil