mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-02 09:45:50 +00:00
c465b18cb2
`StateRootInHeader` is duplicated similarly to `Network`. It will be removed in future as it is surely a protocol parameter. Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
38 lines
1.5 KiB
Go
38 lines
1.5 KiB
Go
package result
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
|
"github.com/nspcc-dev/neo-go/pkg/encoding/fixedn"
|
|
)
|
|
|
|
type (
|
|
// Version model used for reporting server version
|
|
// info.
|
|
Version struct {
|
|
// Magic contains network magic.
|
|
// Deprecated: use Protocol.StateRootInHeader instead
|
|
Magic netmode.Magic `json:"network"`
|
|
TCPPort uint16 `json:"tcpport"`
|
|
WSPort uint16 `json:"wsport,omitempty"`
|
|
Nonce uint32 `json:"nonce"`
|
|
UserAgent string `json:"useragent"`
|
|
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"`
|
|
InitialGasDistribution fixedn.Fixed8 `json:"initialgasdistribution"`
|
|
// StateRootInHeader is true if state root is contained in block header.
|
|
StateRootInHeader bool `json:"staterootinheader,omitempty"`
|
|
}
|
|
)
|