Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type P2PConfig ¶
type P2PConfig struct {
RootDir string `json:"rpc" toml:"home"`
// Address to listen for incoming connections
ListenAddress string `json:"laddr" toml:"laddr" comment:"Address to listen for incoming connections"`
// Address to advertise to peers for them to dial
ExternalAddress string `` /* 232-byte string literal not displayed */
// Comma separated list of seed nodes to connect to
Seeds string `json:"seeds" toml:"seeds" comment:"Comma separated list of seed nodes to connect to"`
// Comma separated list of nodes to keep persistent connections to
PersistentPeers string `json:"persistent_peers" toml:"persistent_peers" comment:"Comma separated list of nodes to keep persistent connections to"`
// Maximum number of inbound peers
MaxNumInboundPeers uint64 `json:"max_num_inbound_peers" toml:"max_num_inbound_peers" comment:"Maximum number of inbound peers"`
// Maximum number of outbound peers to connect to, excluding persistent peers
MaxNumOutboundPeers uint64 `` /* 144-byte string literal not displayed */
// Time to wait before flushing messages out on the connection
FlushThrottleTimeout time.Duration `` /* 129-byte string literal not displayed */
// Maximum size of a message packet payload, in bytes
MaxPacketMsgPayloadSize int `` /* 130-byte string literal not displayed */
// Rate at which packets can be sent, in bytes/second
SendRate int64 `json:"send_rate" toml:"send_rate" comment:"Rate at which packets can be sent, in bytes/second"`
// Rate at which packets can be received, in bytes/second
RecvRate int64 `json:"recv_rate" toml:"recv_rate" comment:"Rate at which packets can be received, in bytes/second"`
// Set true to enable the peer-exchange reactor
PeerExchange bool `json:"pex" toml:"pex" comment:"Set true to enable the peer-exchange reactor"`
// Comma separated list of peer IDs to keep private (will not be gossiped to other peers)
PrivatePeerIDs string `` /* 144-byte string literal not displayed */
}
P2PConfig defines the configuration options for the Tendermint peer-to-peer networking layer
func DefaultP2PConfig ¶
func DefaultP2PConfig() *P2PConfig
DefaultP2PConfig returns a default configuration for the peer-to-peer layer
func (*P2PConfig) ValidateBasic ¶
ValidateBasic performs basic validation (checking param bounds, etc.) and returns an error if any check fails.
Click to show internal directories.
Click to hide internal directories.