Merge pull request #2435 from nspcc-dev/rpc/getversion-fix

rpc: adjust `getversion` RPC response
This commit is contained in:
Roman Khimov 2022-04-14 14:53:19 +03:00 committed by GitHub
commit 4e028cca89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -2,7 +2,6 @@ package result
import (
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
)
type (
@ -32,7 +31,7 @@ type (
MaxTransactionsPerBlock uint16 `json:"maxtransactionsperblock"`
MemoryPoolMaxTransactions int `json:"memorypoolmaxtransactions"`
ValidatorsCount byte `json:"validatorscount"`
InitialGasDistribution fixedn.Fixed8 `json:"initialgasdistribution"`
InitialGasDistribution int64 `json:"initialgasdistribution"`
// StateRootInHeader is true if state root is contained in block header.
StateRootInHeader bool `json:"staterootinheader,omitempty"`
}

View file

@ -537,7 +537,7 @@ func (s *Server) getVersion(_ request.Params) (interface{}, *response.Error) {
MaxTransactionsPerBlock: cfg.MaxTransactionsPerBlock,
MemoryPoolMaxTransactions: cfg.MemPoolSize,
ValidatorsCount: byte(cfg.GetNumOfCNs(s.chain.BlockHeight())),
InitialGasDistribution: cfg.InitialGASSupply,
InitialGasDistribution: int64(cfg.InitialGASSupply),
StateRootInHeader: cfg.StateRootInHeader,
},
}, nil