2018-03-23 20:36:59 +00:00
|
|
|
package result
|
|
|
|
|
2021-09-07 12:42:04 +00:00
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
|
|
|
)
|
2020-10-14 13:52:49 +00:00
|
|
|
|
2018-03-23 20:36:59 +00:00
|
|
|
type (
|
|
|
|
// Version model used for reporting server version
|
|
|
|
// info.
|
|
|
|
Version struct {
|
2021-09-07 12:42:04 +00:00
|
|
|
// Magic contains network magic.
|
|
|
|
// Deprecated: use Protocol.StateRootInHeader instead
|
2021-04-28 20:41:31 +00:00
|
|
|
Magic netmode.Magic `json:"network"`
|
2020-10-14 13:52:49 +00:00
|
|
|
TCPPort uint16 `json:"tcpport"`
|
|
|
|
WSPort uint16 `json:"wsport,omitempty"`
|
|
|
|
Nonce uint32 `json:"nonce"`
|
|
|
|
UserAgent string `json:"useragent"`
|
2021-09-07 12:42:04 +00:00
|
|
|
Protocol Protocol `json:"protocol"`
|
|
|
|
// StateRootInHeader is true if state root is contained in block header.
|
|
|
|
// Deprecated: use Protocol.StateRootInHeader instead
|
|
|
|
StateRootInHeader bool `json:"staterootinheader,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// Protocol represents network-dependent parameters.
|
|
|
|
Protocol struct {
|
|
|
|
AddressVersion byte `json:"addressversion"`
|
|
|
|
Network netmode.Magic `json:"network"`
|
|
|
|
MillisecondsPerBlock int `json:"msperblock"`
|
|
|
|
MaxTraceableBlocks uint32 `json:"maxtraceableblocks"`
|
|
|
|
MaxValidUntilBlockIncrement uint32 `json:"maxvaliduntilblockincrement"`
|
|
|
|
MaxTransactionsPerBlock uint16 `json:"maxtransactionsperblock"`
|
|
|
|
MemoryPoolMaxTransactions int `json:"memorypoolmaxtransactions"`
|
2021-09-28 07:10:26 +00:00
|
|
|
ValidatorsCount byte `json:"validatorscount"`
|
2021-09-07 12:42:04 +00:00
|
|
|
InitialGasDistribution fixedn.Fixed8 `json:"initialgasdistribution"`
|
2020-11-17 12:57:50 +00:00
|
|
|
// StateRootInHeader is true if state root is contained in block header.
|
|
|
|
StateRootInHeader bool `json:"staterootinheader,omitempty"`
|
2018-03-23 20:36:59 +00:00
|
|
|
}
|
|
|
|
)
|